mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Jon Hunter <jonathanh@nvidia.com>,
	Thierry Reding <thierry.reding@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH printk v2 1/2] printk/nbcon: Flush nbcon_irq_work in nbcon_free()
Date: Tue, 1 Sep 2026 09:40:29 +0200	[thread overview]
Message-ID: <apaBbVmBClxIqCdE@pathway.suse.cz> (raw)
In-Reply-To: <87se3upbrk.fsf@jogness.linutronix.de>

On Mon 2026-08-31 17:15:35, John Ogness wrote:
> On 2026-08-31, Petr Mladek <pmladek@suse.com> wrote:
> >> diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c
> >> index a5921a84a80ed..218b1922a58de 100644
> >> --- a/kernel/printk/nbcon.c
> >> +++ b/kernel/printk/nbcon.c
> >> @@ -1849,6 +1849,8 @@ void nbcon_free(struct console *con)
> >>  			printk_kthreads_running = false;
> >>  	}
> >>  
> >> +	irq_work_sync(&con->irq_work);
> >
> > The irq_work work tries to wake up the printk kthread which
> > has been destroyed above. 
> 
> Note that the irq_work only wakes up con->rcuwait waiters. Since the
> kthread has already ended, it certainly is not waiting and there is no
> wakeup.

Yes, but this is an implementation detail.

> The irq_work_sync() call is literally just to clear out the irq_work
> queue, not to actually wake anything.

I still believe that this should rather be done before the kthread
is destroyed. IMHO, it would be more logical there. Or is there any
reason why you would prefer to flush it later?

I am sorry for being so stubborn. It is not a big deal.
The current ordering just looks suspicious and weird.
I could live with it. This is my last attempt to convince you ;-)

Best Regards,
Petr

  reply	other threads:[~2026-09-01  7:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28 14:02 [PATCH printk v2 0/2] nbcon irq_work fixes John Ogness
2026-08-28 14:02 ` [PATCH printk v2 1/2] printk/nbcon: Flush nbcon_irq_work in nbcon_free() John Ogness
2026-08-31 15:01   ` Petr Mladek
2026-08-31 15:09     ` John Ogness
2026-09-01  7:40       ` Petr Mladek [this message]
2026-08-28 14:02 ` [PATCH printk v2 2/2] printk/nbcon: Change nbcon_irq_work to IRQ_WORK_LAZY John Ogness
2026-08-28 15:36 ` [PATCH printk v2 0/2] nbcon irq_work fixes Jon Hunter
2026-08-28 23:39 ` Bradley Morgan
2026-08-31  6:36   ` Sebastian Andrzej Siewior
2026-08-31  7:31     ` Bradley Morgan
2026-08-31  8:22       ` Sebastian Andrzej Siewior
2026-08-31  8:42         ` Bradley Morgan
2026-08-31  8:50         ` 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=apaBbVmBClxIqCdE@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=bigeasy@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.ogness@linutronix.de \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=thierry.reding@kernel.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®