From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [RFC][PATCH 10/16] writeback: simplify bdi code a little Date: Sun, 18 Jul 2010 02:56:13 -0400 Message-ID: <20100718065613.GI23811@infradead.org> References: <1279284312-2411-1-git-send-email-dedekind1@gmail.com> <1279284312-2411-11-git-send-email-dedekind1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jens Axboe , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Artem Bityutskiy Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:42019 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417Ab0GRG4O (ORCPT ); Sun, 18 Jul 2010 02:56:14 -0400 Content-Disposition: inline In-Reply-To: <1279284312-2411-11-git-send-email-dedekind1@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Looks correct, but I would do this slightly different. Add a new bdi_writeback_start_thread helper, and then call it from the list walk as long as there are bdis that need a thread. Only break out of the loop once nothing needs to be done and then sleep.