From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH, RFC] simplify writeback thread creation Date: Thu, 08 Jul 2010 10:08:17 +0300 Message-ID: <1278572897.12733.70.camel@localhost> References: <20100707225242.GA28802@lst.de> Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: axboe@kernel.dk, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from smtp.nokia.com ([192.100.122.233]:53587 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752111Ab0GHHNM (ORCPT ); Thu, 8 Jul 2010 03:13:12 -0400 In-Reply-To: <20100707225242.GA28802@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Thanks Christoph, I'll try to test it in my environment. On Thu, 2010-07-08 at 00:52 +0200, 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. >=20 > This leads to some very complex code, and the need to keep a forker > thread around. I'd add here a comment that due to the complexity it is not bug-free - e.g., I pointed to the race between thread suicide and wake-up. Also I'd add a comment that it leads to more thread types waking up periodically and consuming power. With just one thread type it is easie= r to fix this issue. > This patch removes all this code and simply creates the thread as par= t > 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 ressourc= es. s/ressources/resources/ :-) On the other hand, there was a message that process IDs are precious resource on large NUMA systems. So, less suicides, more free IDs :-) Bu= t this is just a minor note. > 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. Well, the threads can exit, then we need: 1. when adding bdi works and the thread exited, forr it. 2. the same should be done in __mark_inode_dirty - if the bdi thread is dead, create it. --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html