From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] Prevent large file writeback starvation Date: Tue, 7 Feb 2006 14:51:34 -0800 Message-ID: <20060207145134.2fcba768.akpm@osdl.org> References: <20060206040027.GI43335175@melbourne.sgi.com> <20060205202733.48a02dbe.akpm@osdl.org> <20060206054815.GJ43335175@melbourne.sgi.com> <20060205222215.313f30a9.akpm@osdl.org> <20060206115500.GK43335175@melbourne.sgi.com> <20060206151435.731b786c.akpm@osdl.org> <20060207003410.GS43335175@melbourne.sgi.com> <20060206170411.360f3a97.akpm@osdl.org> <20060207013157.GU43335175@melbourne.sgi.com> <20060206212750.2126ca8c.akpm@osdl.org> <20060207074213.GX58731470@melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dgc@sgi.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Return-path: Received: from smtp.osdl.org ([65.172.181.4]:34970 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S932448AbWBGWtb (ORCPT ); Tue, 7 Feb 2006 17:49:31 -0500 To: David Chinner In-Reply-To: <20060207074213.GX58731470@melbourne.sgi.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org David Chinner wrote: > > So, if we leave the inode on the "more to do" list, we need to prevent > overwrite from monopolising writeout because the only thing stopping it > now is the fact the inode gets shoved to the dirty list by chance..... > > I'm going to have a bit more of a think about this. Current > patch attached below. One concern I have about all this is sys_sync() and umount->sync_inodes_sb(). Those functions _must_ write all inodes and wait upon the result. If pdflush is concurrently moving inodes between the various lists, we'll miss inodes. I suspect we're wrong already. Adding more lists won't help. Possibly adding some tests for sb->s_syncing in the right place will plug the problem, but it'll be hard to test and won't do much to clarify things. An alternative fix is to add locking, which might be acceptable.