Re: [PATCH] Prevent large file writeback starvation

From: Andrew Morton
Date: Tue Feb 07 2006 - 17:47:34 EST


David Chinner <dgc@xxxxxxx> 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/