[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yqo8bbp10BFqNmiD@alley>
Date: Wed, 15 Jun 2022 22:09:17 +0200
From: Petr Mladek <pmladek@...e.com>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: John Ogness <john.ogness@...utronix.de>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>, frederic@...nel.org,
Peter Geis <pgwipeout@...il.com>, zhouzhouyi@...il.com,
dave@...olabs.net, josh@...htriplett.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
rcu@...r.kernel.org, linux-rockchip@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] printk: Prevent printk kthreads from blocking direct
console handling
On Wed 2022-06-15 10:10:42, Paul E. McKenney wrote:
> On Wed, Jun 15, 2022 at 06:28:03PM +0200, Petr Mladek wrote:
> > There are reports that console kthreads prevented printing
> > messages during panic() or shutdown(), see
> > BugLink: https://lore.kernel.org/r/20220610205038.GA3050413@paulmck-ThinkPad-P17-Gen-1
> > BugLink: https://lore.kernel.org/r/CAMdYzYpF4FNTBPZsEFeWRuEwSies36QM_As8osPWZSr2q-viEA@mail.gmail.com
> >
> > In both situations, printk() correctly tries to flush the consoles
> > directly but it fails to get the global console_lock(). Both
> > problems went away with these patches:
> >
> > 1st patch blocks console kthreads so that they do not start
> > handling new messages when the direct printing is preferred
> > by the system state. It is probably enough on its own. It
> > solves the problem when the kthreads actively did
> > the wrong thing.
> >
> > 2nd patch allows to wait for the console kthreads to release
> > the lock in any context. It should make it more reliable.
> > It would have been useful even for the legacy code.
>
> Thank you!
>
> For the series:
>
> Tested-by: Paul E. McKenney <paulmck@...nel.org>
Thanks a lot for testing.
I have pushed it into printk/linux.git, branch rework/kthreads
to give it a spin in linux-next.
Best Regards,
Petr
Powered by blists - more mailing lists