printk: Remove preempt_disable() from __wake_up_klogd()
PATCH 1/1 printk: Remove preempt_disable() from __wake_up_klogd()
I was puzzled why there is a preempt_disable(). Turns out it is due to the per-CPU usage of the previous irq_work, as introduced in commit 74876a98a87a1 ("printk: Wake up klogd using irq_work"), where the or and enqueue must happen on the same CPU.
Since we don't have this anymore, it can go.
Remove the preempt_disable from __wake_up_klogd().
---
I'm sorry, I noticed this after starring at it once I sent the patch. I could resend and merge it into the previous if it is preferred.
kernel/printk/printk.c | 3 --- 1 file changed, 3 deletions(-)
kernel/printk/printk.c +0 -3
@@ -4623,7 +4623,6 @@ static void __wake_up_klogd(int val)if (WARN_ON_ONCE (console_irqwork_blocked))return ; -preempt_disable ();/* * Guarantee any new records can be seen by tasks preparing to wait * before this context checks if the wait queue is empty.
@@ -4640,8 +4639,6 @@ static void __wake_up_klogd(int val)if (val &PRINTK_PENDING_OUTPUT )irq_work_queue (&pending_output_work); - -preempt_enable (); }/**
Signature · 1 line
2.55.0
Quoted 2 lines · On 2026-09-11 12:51:28 [+0200], To [email protected] wrote:
I'm sorry, I noticed this after starring at it once I sent the patch. I could resend and merge it into the previous if it is preferred.
Now that I forgot to close the editor and did stare again, didn't we want to rip out console_irqwork_blocked()?
Sebastian
John Ogness
maintainerHi Sebastian,
I am responding for completeness...
Quoted 1 line · Sebastian Andrzej Siewior
didn't we want to rip out
console_irqwork_blocked()?
As I mention in a previous email [0], it provides other significant benefits. So we do not want to rip it out, but at some point we should rename it for its "true" purpose.
John
Quoted 1 line · John Ogness
Hi Sebastian,
Hi John,
Quoted 8 lines
I am responding for completeness...
Quoted 1 line · Sebastian Andrzej Siewior
didn't we want to rip out
console_irqwork_blocked()?As I mention in a previous email [0], it provides other significant benefits. So we do not want to rip it out, but at some point we should rename it for its "true" purpose.
Then please do so. Right now it looks like a workaround for tegra20 which has been replaced with the lazy-irq-work workaround.
Quoted 1 line
John
Sebastian