[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ytgu17hATM8iqdGC@linutronix.de>
Date: Wed, 20 Jul 2022 18:35:35 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: John Ogness <john.ogness@...utronix.de>
Cc: linux-kernel@...r.kernel.org, Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] printk: Skip console drivers on PREEMPT_RT.
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
Powered by blists - more mailing lists