diff options
author | John Ogness <john.ogness@linutronix.de> | 2024-09-04 14:11:35 +0206 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2024-09-04 15:56:33 +0200 |
commit | 1529bbb6e2619495f146dd519a196b67837fdfa6 (patch) | |
tree | 4964cc062673d800e77c08113f58cae2dc54a042 /kernel/printk | |
parent | 5f53ca3ff83b4f2f3ff360bb22bba7a9a3af71a3 (diff) | |
download | linux-1529bbb6e2619495f146dd519a196b67837fdfa6.tar.gz linux-1529bbb6e2619495f146dd519a196b67837fdfa6.tar.bz2 linux-1529bbb6e2619495f146dd519a196b67837fdfa6.zip |
printk: nbcon: Assign nice -20 for printing threads
It is important that console printing threads are scheduled
shortly after a printk call and with generous runtime budgets.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240904120536.115780-17-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'kernel/printk')
-rw-r--r-- | kernel/printk/nbcon.c | 6 | ||||
-rw-r--r-- | kernel/printk/printk.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c index 98440889d222..fd12efcc4aed 100644 --- a/kernel/printk/nbcon.c +++ b/kernel/printk/nbcon.c @@ -1321,6 +1321,12 @@ bool nbcon_kthread_create(struct console *con) con->kthread = kt; + /* + * It is important that console printing threads are scheduled + * shortly after a printk call and with generous runtime budgets. + */ + sched_set_normal(con->kthread, -20); + return true; } diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 66cfe7b8f95c..afd926611f0f 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -3555,6 +3555,12 @@ static bool legacy_kthread_create(void) printk_legacy_kthread = kt; + /* + * It is important that console printing threads are scheduled + * shortly after a printk call and with generous runtime budgets. + */ + sched_set_normal(printk_legacy_kthread, -20); + return true; } |