* [PATCH] printk: Remove preempt_disable() from __wake_up_klogd()
@ 2026-09-11 10:51 Sebastian Andrzej Siewior
2026-09-11 10:58 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-09-11 10:51 UTC (permalink / raw)
To: linux-kernel; +Cc: Petr Mladek, Steven Rostedt, John Ogness, Sergey Senozhatsky
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().
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
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(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 7c5a220e84323..0fd6c37e2b333 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -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();
}
/**
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] printk: Remove preempt_disable() from __wake_up_klogd()
2026-09-11 10:51 [PATCH] printk: Remove preempt_disable() from __wake_up_klogd() Sebastian Andrzej Siewior
@ 2026-09-11 10:58 ` Sebastian Andrzej Siewior
2026-09-21 16:47 ` John Ogness
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-09-11 10:58 UTC (permalink / raw)
To: linux-kernel; +Cc: Petr Mladek, Steven Rostedt, John Ogness, Sergey Senozhatsky
On 2026-09-11 12:51:28 [+0200], To linux-kernel@vger.kernel.org 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] printk: Remove preempt_disable() from __wake_up_klogd()
2026-09-11 10:58 ` Sebastian Andrzej Siewior
@ 2026-09-21 16:47 ` John Ogness
2026-09-22 6:32 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 4+ messages in thread
From: John Ogness @ 2026-09-21 16:47 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, linux-kernel
Cc: Petr Mladek, Steven Rostedt, Sergey Senozhatsky
Hi Sebastian,
I am responding for completeness...
On 2026-09-11, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> 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
[0] https://lore.kernel.org/lkml/87wltbo97m.fsf@jogness.linutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] printk: Remove preempt_disable() from __wake_up_klogd()
2026-09-21 16:47 ` John Ogness
@ 2026-09-22 6:32 ` Sebastian Andrzej Siewior
0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-09-22 6:32 UTC (permalink / raw)
To: John Ogness; +Cc: linux-kernel, Petr Mladek, Steven Rostedt, Sergey Senozhatsky
On 2026-09-21 18:53:36 [+0206], John Ogness wrote:
> Hi Sebastian,
Hi John,
> I am responding for completeness...
>
> On 2026-09-11, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> > 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.
> John
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-22 6:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 10:51 [PATCH] printk: Remove preempt_disable() from __wake_up_klogd() Sebastian Andrzej Siewior
2026-09-11 10:58 ` Sebastian Andrzej Siewior
2026-09-21 16:47 ` John Ogness
2026-09-22 6:32 ` Sebastian Andrzej Siewior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®