lkml.org 
[lkml]   [2016]   [Mar]   [22]   [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 Tue 2016-03-22 14:11:06, Petr Mladek wrote:
> On Tue 2016-03-22 02:25:29, Sergey Senozhatsky wrote:
> > +static void wake_up_klogd_work_func(struct irq_work *irq_work)
> > +{
> > + int pending = __this_cpu_xchg(printk_pending, 0);
> > +
> > + if (pending & PRINTK_PENDING_OUTPUT) {
> > + /* If trylock fails, someone else is doing the printing */
> > + if (console_trylock())
> > + console_unlock();
>
> This is called from IRQ context and thus keeps the original problem
> for printk_deferred(). We should try to
> wake_up_process(printk_kthread) when allowed.
>
> if (pending & PRINTK_PENDING_OUTPUT) {
> if (printk_sync || !printk_kthread) {
> /* If trylock fails, someone else is printing. */
> if (console_trylock())
> console_unlock();
> } else {
> wake_up_process(printk_kthread);
> }
> }

Ah, this is in the 2nd patch. I am sorry for the noise.

Best Regards,
Petr

\
 
 \ /
  Last update: 2016-03-22 15:41    [W:0.086 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site