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

Sergey Senozhatsky
2016-03-16T02:29:51Z

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