public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Mike Galbraith <efault@gmx.de>,
	RT <linux-rt-users@vger.kernel.org>
Subject: Re: v5.19-rc2-rt3: nouveau might sleep splat
Date: Wed, 3 Aug 2022 18:10:47 +0200	[thread overview]
Message-ID: <YuqeB6Z0ZYNb2TxC@alley> (raw)
In-Reply-To: <87h735ikdh.fsf@jogness.linutronix.de>

On Mon 2022-07-25 12:04:50, John Ogness wrote:
> On 2022-07-25, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> > I remember asking why it is needed to disable interrupts across
> > vsnprintf(). John, can I take this as-it or are you sending a new
> > batch?
> 
> Mike's patch only addresses the vsnprintf() to print the prefix and get
> the message length. There is also a vscnprintf() for the message itself,
> which is still happening with interrupts disabled (see
> printk_sprint()). I suppose this patch side-steps the splat because the
> first vsnprintf() already triggered the random bytes for the pointer
> hash.
> 
> I am preparing a new series that addresses this by completely removing
> interrupt disabling from the printk() path. This required changes to the
> printk_enter() macro, recursion handling, and the printk-ringbuffer
> itself.
> 
> The focus of my new series are the various non-RT issues reported during
> the early 5.19-rc cycles. I still need more time to get the series into
> shape for LKML.

The pull request for-5.20 was a great fiasko, see
https://lore.kernel.org/r/CAHk-=wie+VC-R5=Hm=Vrg5PLrJxb1XiV67Efx-9Cr1fBKCWHTQ@mail.gmail.com
We need to be super careful with the next pull request if there will
be any.

My proposal is to start with as conservative version of printk
kthread(s) as possible. It means to start either with a single
kthread. Or use per-console kthreads where the critical section
will be guarded by per-console.

The single kthread will help to avoid any races that were originally
prevented by console_sem().

The spin lock will cause that printk kthreads will never block
the global console_lock while sleeping (at least on non-RT system).

I am not going to accept any removal of disabled interrupts in
the first round. It opens another can of worms.

I understand that enabled interrupts will be needed on RT kernel.
We could do it later when the conservative kthread(s) are accepted.
And we could do it RT-specific. But we have to keep consoles
as reliable as possible in non-RT system.

Best Regards,
Petr

  parent reply	other threads:[~2022-08-03 16:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-18  9:25 v5.19-rc2-rt3: nouveau might sleep splat Mike Galbraith
2022-06-24  8:42 ` Sebastian Andrzej Siewior
2022-06-24  9:52   ` Mike Galbraith
2022-06-24 10:18     ` Sebastian Andrzej Siewior
2022-06-24 10:19       ` Sebastian Andrzej Siewior
2022-06-24 14:30       ` John Ogness
2022-06-24 14:31         ` John Ogness
2022-06-24 14:39           ` Sebastian Andrzej Siewior
2022-06-25  3:26             ` Mike Galbraith
2022-07-21 13:06           ` Mike Galbraith
2022-07-25  8:15             ` Sebastian Andrzej Siewior
2022-07-25  9:58               ` John Ogness
2022-07-25 13:26                 ` Mike Galbraith
2022-08-03 16:10                 ` Petr Mladek [this message]
2022-08-05 14:23                   ` John Ogness

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=YuqeB6Z0ZYNb2TxC@alley \
    --to=pmladek@suse.com \
    --cc=bigeasy@linutronix.de \
    --cc=efault@gmx.de \
    --cc=john.ogness@linutronix.de \
    --cc=linux-rt-users@vger.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