From: Petr Mladek <pmladek@suse.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
John Ogness <john.ogness@linutronix.de>,
Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: "Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
"Marco Elver" <elver@google.com>,
"David Laight" <David.Laight@ACULAB.COM>,
"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
"Paul E . McKenney" <paulmck@kernel.org>,
"Zhouyi Zhou" <zhouzhouyi@gmail.com>,
dave@stgolabs.net, "Josh Triplett" <josh@joshtriplett.org>,
rcu@vger.kernel.org, frederic@kernel.org,
"Marek Behún" <kabel@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/6] Revert "printk: Block console kthreads when direct printing will be required"
Date: Thu, 23 Jun 2022 16:51:53 +0200 [thread overview]
Message-ID: <20220623145157.21938-3-pmladek@suse.com> (raw)
In-Reply-To: <20220623145157.21938-1-pmladek@suse.com>
This reverts commit c3230283e2819a69dad2cf7a63143fde8bab8b5c.
The testing of 5.19 release candidates revealed missing synchronization
between early and regular console functionality.
It would be possible to start the console kthreads later as a workaround.
But it is clear that console lock serialized console drivers between
each other. It opens a big area of possible problems that were not
considered by people involved in the development and review.
printk() is crucial for debugging kernel issues and console output is
very important part of it. The number of consoles is huge and a proper
review would take some time. As a result it need to be reverted for 5.19.
Link: https://lore.kernel.org/r/YrBdjVwBOVgLfHyb@alley
Signed-off-by: Petr Mladek <pmladek@suse.com>
---
kernel/printk/printk.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 45c6c2b0b104..ea3dd55709e7 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -3729,9 +3729,7 @@ static bool printer_should_wake(struct console *con, u64 seq)
return true;
if (con->blocked ||
- console_kthreads_atomically_blocked() ||
- system_state > SYSTEM_RUNNING ||
- oops_in_progress) {
+ console_kthreads_atomically_blocked()) {
return false;
}
--
2.35.3
next prev parent reply other threads:[~2022-06-23 14:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 14:51 [PATCH 0/6] printk: Revert console kthreads for 5.19 Petr Mladek
2022-06-23 14:51 ` [PATCH 1/6] Revert "printk: Wait for the global console lock when the system is going down" Petr Mladek
2022-06-23 14:51 ` Petr Mladek [this message]
2022-06-23 14:51 ` [PATCH 3/6] Revert "printk: remove @console_locked" Petr Mladek
2022-06-23 14:51 ` [PATCH 4/6] Revert "printk: extend console_lock for per-console locking" Petr Mladek
2022-06-23 14:51 ` [PATCH 5/6] Revert "printk: add kthread console printers" Petr Mladek
2022-06-23 14:51 ` [PATCH 6/6] Revert "printk: add functions to prefer direct printing" Petr Mladek
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=20220623145157.21938-3-pmladek@suse.com \
--to=pmladek@suse.com \
--cc=David.Laight@ACULAB.COM \
--cc=Jason@zx2c4.com \
--cc=andy.shevchenko@gmail.com \
--cc=dave@stgolabs.net \
--cc=elver@google.com \
--cc=frederic@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=john.ogness@linutronix.de \
--cc=josh@joshtriplett.org \
--cc=kabel@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=torvalds@linux-foundation.org \
--cc=zhouzhouyi@gmail.com \
/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