Re: [RFC][PATCHv4 0/7] printk: introduce printing kernel threads
From: Sergey Senozhatsky
Date: Fri Jun 30 2017 - 08:45:14 EST
On (06/30/17 14:11), Petr Mladek wrote:
> > 2) can offload printing to other CPUs from vprintk_emit()
> > and avoid any of scheduler->timekeeping->etc. paths. which will
> > replace printk_deferred().
>
> I probably miss something. There is still called wake_up_process()
> in this patchset and we could not do this in some scheduler and
> timekeeping paths. Also we must not take the console_lock() in
> these paths because it calls wake_up_process() as well. But
> we want to flush few lines when possible.
yes. but we could call wake_up_process() on !this_cpu.
so we wouldn't take this_cpu ->rq lock and so on.
CPU1
vprintk_emit()
wake_up_process(printk_kthread on CPU2);
-ss