linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: John Ogness <john.ogness@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] printk: Skip console drivers on PREEMPT_RT.
Date: Wed, 20 Jul 2022 18:35:35 +0200	[thread overview]
Message-ID: <Ytgu17hATM8iqdGC@linutronix.de> (raw)
In-Reply-To: <87y1wn3g3g.fsf@jogness.linutronix.de>

On 2022-07-20 18:32:43 [+0206], John Ogness wrote:
> Hi Sebastian,
Hi,

> > --- a/kernel/printk/printk.c
> > +++ b/kernel/printk/printk.c
> > @@ -2843,6 +2843,16 @@ void console_unlock(void)
> >  	}
> >  
> >  	/*
> > +	 * On PREEMPT_RT it is not possible to invoke console drivers with
> > +	 * disabled interrupts and or preemption. Therefore all drivers are
> > +	 * skipped and the output can be retrieved from the buffer.
> > +	 */
> > +	if (IS_ENABLED(CONFIG_PREEMPT_RT)) {
> > +		up_console_sem();
> 
> This should be:
> 
>                 __console_unlock();

Why?

> > +		return;
> > +	}
> 
> Note that if @console_may_schedule is 1, then we are in a sleepable
> context and could print. But since that is not very often, it is
> probably better to just have it off all the time as you propose.

No we can't coz printk disables interrupts before invoking the console
drivers.

> John Ogness

Sebastian

  reply	other threads:[~2022-07-20 16:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 15:48 [PATCH] printk: Skip console drivers on PREEMPT_RT Sebastian Andrzej Siewior
2022-07-20 16:26 ` John Ogness
2022-07-20 16:35   ` Sebastian Andrzej Siewior [this message]
2022-07-20 17:50     ` John Ogness
2022-07-21  6:50       ` [PATCH v2] " Sebastian Andrzej Siewior
2022-07-22 12:39         ` Petr Mladek
2022-07-22 17:03           ` Sebastian Andrzej Siewior
2022-07-25 12:30             ` Petr Mladek
2022-07-25 12:51               ` John Ogness
2022-07-25 13:55               ` Sebastian Andrzej Siewior
2022-07-25 14:24                 ` Petr Mladek
2022-07-25 15:16                   ` [PATCH v3] " Sebastian Andrzej Siewior
2022-07-26  7:39                     ` Petr Mladek
2022-07-26  7:57                     ` John Ogness
2022-07-26 13:11                       ` 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=Ytgu17hATM8iqdGC@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).