lkml.org 
[lkml]   [2016]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH v2 1/2] printk: Make printk() completely async
On (03/07/16 11:52), Jan Kara wrote:
[..]
> So for UP systems, we should by default disable async printing anyway I
> suppose. It is just a pointless overhead. So please just make printk_sync
> default to true if !CONFIG_SMP.

ok, thanks.

> When IRQs are disabled, you're right we will have a change in behavior. I
> don't see an easy way of avoiding delaying of printk until IRQs get
> enabled. I don't want to queue work directly because that creates
> possibility for lock recursion in queue_work(). And playing some tricks
> with irq_works isn't easy either - you cannot actually rely on any other
> CPU doing anything (even a timer tick) because of NOHZ.

yes. I thought about some sort of PRINTK_IPI on smp, and queue work from
PRINTK_IPI. which is a bit insane.

> So if this will be a problem in practice, using a kthread will probably be
> the easiest solution.

probably kthread is the way to go then. Tetsuo's bad experience with
workqueues also sounds a bit alarming.

I'll post a new patch soon.

-ss

\
 
 \ /
  Last update: 2016-03-07 16:21    [W:0.075 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site