mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Petr Mladek <pmladek@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	John Ogness <john.ogness@linutronix.de>,
	Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: [PATCH] printk: Remove preempt_disable() from __wake_up_klogd()
Date: Fri, 11 Sep 2026 12:51:26 +0200	[thread overview]
Message-ID: <20260911105126.aPCuP2jV@linutronix.de> (raw)

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


             reply	other threads:[~2026-09-11 10:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11 10:51 Sebastian Andrzej Siewior [this message]
2026-09-11 10:58 ` Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260911105126.aPCuP2jV@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®