[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160401163917.GC1212@swordfish>
Date: Sat, 2 Apr 2016 01:39:17 +0900
From: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jan Kara <jack@...e.com>, Tejun Heo <tj@...nel.org>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
linux-kernel@...r.kernel.org,
Byungchul Park <byungchul.park@....com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Jan Kara <jack@...e.cz>
Subject: Re: [RFC][PATCH v9 1/2] printk: Make printk() completely async
On (04/01/16 17:00), Petr Mladek wrote:
> You need to move this assigment right above the console_lock()/console_unlock()
> calls. Otherwise, there is a race:
>
> CPU0: CPU1
>
> printk_kthread_func()
>
> console_unlock()
>
> printk()
>
> printk_kthread_need_flush_console = true;
> wake_up_process(printk_kthread);
>
> printk_kthread_need_flush_console = false;
>
> set_current_state(TASK_INTERRUPTIBLE);
> if (!printk_kthread_need_flush_console)
> schedule();
thanks. yeah, this can add latency to some messages.
-ss
Powered by blists - more mailing lists