The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Rik van Riel <riel@surriel.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
	mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	vschneid@redhat.com
Subject: Re: [PATCH 0/9] sched: make WARN_ON under rq->lock deadlock-safe (SCHED_WARN_ON)
Date: Fri, 12 Jun 2026 08:52:20 +0200	[thread overview]
Message-ID: <20260612065220.GO187714@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <91b346ee1dfe88390acb462c9c1a8cb8dc3c2b05.camel@surriel.com>

On Thu, Jun 11, 2026 at 09:53:45PM -0400, Rik van Riel wrote:
> On Thu, 2026-06-11 at 21:19 +0200, Peter Zijlstra wrote:
> > 
> > Myself, I almost exclusively run with earlycon serial and force
> > printk
> > to be early_printk() (effectively not using printk at all). This
> > works
> > perfectly fine and is the most reliable thing ever. I can push out
> > characters to the UART from any context.
> > 
> Great for development, not so good for production.
> 
> When something like an OOM kill happens, the amount
> of data printed by the kernel can take a long time
> to get flushed out a serial port.
> 
> In fact, it can take long enough to cause things
> like RCU stalls and soft lockups, and break
> workloads that way.
> 
> Having the serial console deferred allows those
> systems to survive.
> 
> If the system crashes before the messages were sent
> out the serial port, the dmesg buffer will be in
> the vmcore, and get extracted by the crash analysis
> tooling.
> 
> It sounds like the printk people may be right with
> making that behavior an option, since different
> scenarios require different behavior.

I've not hit OOM in a decade or so; I've no idea how much silly nonsense
it spouts. The example the printk people have used for a long while is
booting with a million block devices, apparently that generates insane
amount of boot noise -- another problem I don't have :-)

Anyway, one solution there is to create a threshold and say ERR and
above go directly to atomic console while everything below goes into the
buffer and gets spooled out later on the non-atomic variant.

This way all your WARN/BUG and other useful bits actually hit the wire
when you need them, and the useless verbiage goes into the bin for
later.

Anyway, all this is stuff that seems trivially solvable.

      reply	other threads:[~2026-06-12  6:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11  2:14 [PATCH 0/9] sched: make WARN_ON under rq->lock deadlock-safe (SCHED_WARN_ON) Rik van Riel
2026-06-11  2:14 ` [PATCH 1/9] sched: add SCHED_WARN_ON()/SCHED_WARN_ON_ONCE()/SCHED_WARN()/SCHED_WARN_ONCE() Rik van Riel
2026-06-11  2:14 ` [PATCH 2/9] sched/core: defer WARN console output under rq->lock Rik van Riel
2026-06-11  2:14 ` [PATCH 3/9] sched/fair: " Rik van Riel
2026-06-11  2:14 ` [PATCH 4/9] sched/deadline: " Rik van Riel
2026-06-11  2:14 ` [PATCH 5/9] sched/rt: " Rik van Riel
2026-06-11  2:14 ` [PATCH 6/9] sched_ext: " Rik van Riel
2026-06-11  2:14 ` [PATCH 7/9] sched/core_sched: " Rik van Riel
2026-06-11  2:14 ` [PATCH 8/9] sched/deadline: " Rik van Riel
2026-06-11  2:14 ` [PATCH 9/9] sched/rt: " Rik van Riel
2026-06-11  7:43 ` [PATCH 0/9] sched: make WARN_ON under rq->lock deadlock-safe (SCHED_WARN_ON) Peter Zijlstra
2026-06-11 16:20   ` Rik van Riel
2026-06-11 19:19     ` Peter Zijlstra
2026-06-12  1:53       ` Rik van Riel
2026-06-12  6:52         ` Peter Zijlstra [this message]

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=20260612065220.GO187714@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=riel@surriel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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