From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: [PATCH, RFC] simplify writeback thread creation Date: Thu, 08 Jul 2010 14:20:34 +0200 Message-ID: <4C35C292.9020507@kernel.dk> References: <20100707225242.GA28802@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: dedekind1@gmail.com, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from 0122700014.0.fullrate.dk ([95.166.99.235]:44358 "EHLO kernel.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755504Ab0GHMUh (ORCPT ); Thu, 8 Jul 2010 08:20:37 -0400 In-Reply-To: <20100707225242.GA28802@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 2010-07-08 00:52, Christoph Hellwig wrote: > Currently the per-bdi writeback thread is only created when there is > dirty any dirty data on the BDI, and it lazy exists when it's been > unused for some time. > > This leads to some very complex code, and the need to keep a forker > thread around. > > This patch removes all this code and simply creates the thread as part > of the bdi registration. The downside is that we use up ressoures > for possible unused devices, although that overhead is rather low, > with 8k kernel stack size on x86 and few other, even smaller ressources. > > If the overhead is still considered too much I can look into starting > the thread explicitly instead of as part of the bdi registration, but > that will require a bit of code complexity, too. I'm pretty sure this will come back to bite us in the ass... If we are going to change the lazy create/exit setup, I would greatly prefer doing it at fs mount time (or something to that effect). -- Jens Axboe