All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	John Ogness <john.ogness@linutronix.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Thomas Gleixner <tglx@linutronix.de>, Jan Kara <jack@suse.cz>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] printk for 5.20
Date: Wed, 3 Aug 2022 18:34:30 +0200	[thread overview]
Message-ID: <YuqjloJDmXl7YQkI@linutronix.de> (raw)
In-Reply-To: <CAHk-=wj0umHOtL1TB_7Tvinoqhxz6BnL-jEC0eQfVihHOmbWjw@mail.gmail.com>

On 2022-08-03 09:08:07 [-0700], Linus Torvalds wrote:
> But thinking some more about it, even the "serious RT" people almost
> certainly don't really want some kind of static "disable it all". Not
> even if it was a separate Kconfig question like I suggested.
> 
> You'd most likely want it to be dynamic, because things like "log to
> console" is different at bootup when the system hasn't started yet -
> you can't really have realtime response when your hardware hasn't even
> initialized yet - and when things are actually running.
> 
> So I think even then you really just want a "turn off console logging"
> dynamic flag, not a Kconfig option.

Having such a flag would mean we have to set it starting with
SYSTEM_SCHEDULING because otherwise we risk a deadlock once the console
driver tries to acquire its lock. The printk code invokes the console
drivers with disabled interrupts and the console driver use spinlock_t
locking which become sleeping locks on PREEMPT_RT and must not be
acquired with disabled interrupts.
The long term solution is to have a printing thread for the console
driver and the atomic console support to print directly in an emergency
case.

> Which I think we already have, in the form of log levels. No?
> 
>           Linus

Sebastian

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

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01 15:07 [GIT PULL] printk for 5.20 Petr Mladek
2022-08-01 15:45 ` David Laight
2022-08-02  7:37   ` Petr Mladek
2022-08-03  3:19 ` Linus Torvalds
2022-08-03 14:35   ` Sebastian Andrzej Siewior
2022-08-03 14:46     ` David Laight
2022-08-03 15:43   ` Petr Mladek
2022-08-03 16:06     ` Steven Rostedt
2022-08-03 16:08     ` Linus Torvalds
2022-08-03 16:34       ` Sebastian Andrzej Siewior [this message]
2022-08-03 17:08       ` Ingo Molnar
2022-08-09  1:18   ` Thomas Gleixner
2022-08-11 13:38     ` Daniel Vetter
2022-08-11 13:38       ` Daniel Vetter

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=YuqjloJDmXl7YQkI@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jack@suse.cz \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.