lkml.org 
[lkml]   [2022]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-07-20 18:36    [W:0.067 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site