From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933229AbcCKRWT (ORCPT ); Fri, 11 Mar 2016 12:22:19 -0500 Received: from mail-yw0-f193.google.com ([209.85.161.193]:33347 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932809AbcCKRWO (ORCPT ); Fri, 11 Mar 2016 12:22:14 -0500 Date: Fri, 11 Mar 2016 12:22:11 -0500 From: Tejun Heo To: Sergey Senozhatsky Cc: Sergey Senozhatsky , Jan Kara , Tetsuo Handa , akpm@linux-foundation.org, jack@suse.com, pmladek@suse.com, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH v2 1/2] printk: Make printk() completely async Message-ID: <20160311172211.GD24046@htj.duckdns.org> References: <20160306093530.GA26055@swordfish> <201603062006.IJD17667.OOQFLtMVHOFSJF@I-love.SAKURA.ne.jp> <20160306132703.GA927@swordfish> <20160307082230.GB5201@quack.suse.cz> <20160307101233.GA10690@swordfish> <20160307105248.GF5201@quack.suse.cz> <20160307121625.GG5201@quack.suse.cz> <20160307151047.GA578@swordfish> <20160307154936.GB7065@htj.duckdns.org> <20160308102152.GB457@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160308102152.GB457@swordfish> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Sergey. On Tue, Mar 08, 2016 at 07:21:52PM +0900, Sergey Senozhatsky wrote: > 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? I don't think it makes sense to avoid workqueue for execution latency. The only case which can matter is the rescuer case and as I wrote before the system is already in an extremely high latency mode by the time rescuer is needed, so it's unlikely to make noticeable differences. However, I agree that using kthread is a good idea here just to reduce the amount of dependency as prink working even during complex failures is important. workqueue itself is fairly complex and it also requires timer and task creation to work correctly for proper operation. That's a lot of extra dependency. Thanks. -- tejun