lkml.org 
[lkml]   [2016]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH v6 1/2] printk: Make printk() completely async
On (03/23/16 09:37), Sergey Senozhatsky wrote:
[..]
> ok, I'll take a look.
>
> eventually (after 0003) vprintk_emit() is
>
> if (in_sched) {
> __this_cpu_or(printk_pending,
> PRINTK_PENDING_OUTPUT);
> irq_work_queue(this_cpu_ptr(&wake_up_klogd_work));
> }
> local_irq_restore(flags);
> if (!in_sched) {
> lockdep_off();
> if (console_trylock())
> console_unlock();
> lockdep_on();
> }
>
> > I do not say that it is a "dream-of-like" code. One important thing for
> > me is that it does not use "sync_printk" variable.
> >
> > You original code modified "sync_printk" according to "in_sched" and
> > "in_panic" variables earlier in vprintk_emit. Then it again checked
> > all three variables here which produced strange twists in my head ;-)
>

hm... may be we can do even better.
move printk_pending and irq_work_queue() back to printk_deferred() and
do the preemption magic there. so vprintk_emit() can be lighter. will
take a look later today.

-ss

\
 
 \ /
  Last update: 2016-03-23 10:21    [W:0.061 / U:1.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site