Re: [RFC][PATCH v4 1/2] printk: Make printk() completely async

From: Sergey Senozhatsky
Date: Tue Mar 15 2016 - 22:30:04 EST


On (03/16/16 11:10), Byungchul Park wrote:
> > > What about this?
> > >
> > > int need_flush_console;
> > >
> > > while(1) {
> > > set_current_state(TASK_INTERRUPTIBLE);
> > > if (!need_flush_console)
> > > schedule();
>
> else // This shoule be here, IMHO. Hm?

do __set_current_state(TASK_RUNNING) only if need_flush_console == true?
why? I see no problems with Petr's code.

> > > __set_current_state(TASK_RUNNING);
> > >
> > > need_flush_console = false;
> > >
> > > > + console_lock();
> > > > + console_unlock();
> > > > + }

-ss