[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160308102152.GB457@swordfish>
Date: Tue, 8 Mar 2016 19:21:52 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Tejun Heo <tj@...nel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Jan Kara <jack@...e.cz>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
akpm@...ux-foundation.org, jack@...e.com, pmladek@...e.com,
linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH v2 1/2] printk: Make printk() completely async
Hello Tejun,
On (03/07/16 10:49), Tejun Heo wrote:
> On Tue, Mar 08, 2016 at 12:10:47AM +0900, Sergey Senozhatsky wrote:
> > A new version. Switched to [printk] kthread.
>
> There are some benefits to using a percpu workqueue with CPU_INTENSIVE
> set or an unbound workqueue. It'd need WQ_RESCUER so it'd still
> create a dedicated thread which is used under heavy memory pressure
> but workqueue will usaully give you local (cpu or node) worker. One
> reason to use kthread directly tho is minimizing the amount of
> dependency which is pretty important for printk. If we decide to use
> kthread instead of workqueue, let's please do it for the right reason.
thanks.
I'd personally prefer to go with the "less dependency" option -- a dedicated
kthread, I think. mostly for the sake of simplicity. I agree with the point
that console_unlock() has unpredictable execution time, and in general case
we would have a busy kworker (or sleeping in console_lock() or doing
cond_resched()) and an idle extra WQ_RESCUER kthread, with activation rules
that don't depend on printk. printk with dedicated printk-kthread seems
easier to control. how does it sound?
-ss
Powered by blists - more mailing lists