From: Christoph Hellwig Subject: Re: [PATCH 1/3] mm: Stop background writeback if there is other work queued for the thread Date: Tue, 3 Aug 2010 12:33:21 -0400 Message-ID: <20100803163321.GA21273@infradead.org> References: <1280852440-13630-1-git-send-email-jack@suse.cz> <1280852440-13630-2-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 To: Jan Kara Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:50863 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755880Ab0HCQd0 (ORCPT ); Tue, 3 Aug 2010 12:33:26 -0400 Content-Disposition: inline In-Reply-To: <1280852440-13630-2-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Aug 03, 2010 at 06:20:38PM +0200, Jan Kara wrote: > Background writeback and kupdate-style writeback are easily livelockable > (from a definition of their target). This is inconvenient because it can > make sync(1) stall forever waiting on its queued work to be finished. > Fix the problem by interrupting background and kupdate writeback if there > is some other work to do. We can return to them after completing all the > queued work. I don't think this is quite correct. If the only other callers was fsync_filesystems that would be true, but we also have the odd writeback_if_idle hack in ext4, and the bdi_start_writeback hack in laptop mode.