[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALqELGx05kdGzVDtDXD=cAiSK8vrbON24qHRZPX-mYGV_8t8DQ@mail.gmail.com>
Date: Tue, 30 Sep 2025 14:20:32 +0100
From: Andrew Murray <amurray@...goodpenguin.co.uk>
To: John Ogness <john.ogness@...utronix.de>
Cc: Petr Mladek <pmladek@...e.com>, Steven Rostedt <rostedt@...dmis.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] printk: Use console_flush_one_record for legacy
printer kthread
On Tue, 30 Sept 2025 at 14:03, John Ogness <john.ogness@...utronix.de> wrote:
>
> On 2025-09-27, Andrew Murray <amurray@...goodpenguin.co.uk> wrote:
> > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> > index e2c1cacdb4164489c60fe38f1e2837eb838107d6..2c9b9383df76de956a05211537264fd6e06366da 100644
> > --- a/kernel/printk/printk.c
> > +++ b/kernel/printk/printk.c
> > @@ -3668,17 +3668,29 @@ static bool legacy_kthread_should_wakeup(void)
> >
> > static int legacy_kthread_func(void *unused)
> > {
> > - for (;;) {
> > - wait_event_interruptible(legacy_wait, legacy_kthread_should_wakeup());
> > + bool any_progress;
> > +
> > +wait_for_event:
> > + wait_event_interruptible(legacy_wait,
> > + legacy_kthread_should_wakeup());
> > +
> > + do {
> > + bool any_usable;
> > + bool handover = false;
> > + u64 next_seq;
>
> Please sort by length. It looks nicer. ;-)
>
> bool handover = false;
> bool any_usable;
> u64 next_seq;
I agree :)
>
> Note that it is fine that @any_usable is not initialized here because
> legacy_kthread_func() does not actually care about this variable.
Yes, that's correct. I wasn't sure whether to set it to something
which would likely get optimised away, or if there was some way I
could mark it as not used (didn't see anything beneficial).
Thanks,
Andrew Murray
>
> John
Powered by blists - more mailing lists