From: Christoph Hellwig Subject: Re: [PATCH 2/3] mm: Fix writeback_in_progress() Date: Tue, 3 Aug 2010 12:36:10 -0400 Message-ID: <20100803163610.GB21273@infradead.org> References: <1280852440-13630-1-git-send-email-jack@suse.cz> <1280852440-13630-3-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Wu Fengguang , linux-fsdevel@vger.kernel.org, Jens Axboe , hch@infradead.org To: Jan Kara Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:50913 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757147Ab0HCQgO (ORCPT ); Tue, 3 Aug 2010 12:36:14 -0400 Content-Disposition: inline In-Reply-To: <1280852440-13630-3-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: The patch looks correct to me, but I wonder if we shouldn't try to get rid of writeback_in_progress instead. There's just two users, one is the ext4 writeback_if_idle hack, and the other one is balance_dirty_pages. The latter really should only care about about other background reclaim beeing pending, and I have no idea why the former cares - if e.g. any kind of kupdate in the background is pending which just writes out a few inodes on another fs on the same bdi it's exiting. The XFS variant of this does unconditional writeback for all inodes on the sb. Long term I wonder if we shouldn't get rid of the work list entirely, and just have a few targets for the flusher thread - we just set a target and wake it up, and it keeps running until all targets are met.