From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: bdi forker Date: Wed, 7 Jul 2010 11:08:35 -0400 Message-ID: <20100707150835.GA30235@infradead.org> References: <1278502227.29620.161.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jens Axboe , linux-fsdevel , Christoph Hellwig To: Artem Bityutskiy Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:40128 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757249Ab0GGPIh (ORCPT ); Wed, 7 Jul 2010 11:08:37 -0400 Content-Disposition: inline In-Reply-To: <1278502227.29620.161.camel@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > I was looking at the code and and found it to bee more complex that it > has to be. I'd suggest to: > > 1. Stop exiting per-bdi flushers after 5 minutes of inactivity. > 2. Kill the forker thread and make the default bdi us the same flusher > thread as every other bdi uses. > > This will simplify many things, I believe. Various lists and locks and > will go away, the code will become more readable. They do. I've actually implemented this and it simplifies the code a lot. But there's one big downside: We now create a thread for every block device, even if it's not used. For a normal systems that's fine, but on a system connected to a larger SAN this migh be quite a bit of overhead. Then again systems connected to a large SAN can usually deal with the overhead. I'm planning into just activating the thread if a filesystems in mounted on the BDI, which should be just as a good as the lazy startup/teardown. I'll send out the preliminary series this week so that you can take a look.