[PATCH] Remove mapping->vm_writeback
authorAndrew Morton <akpm@digeo.com>
Fri, 22 Nov 2002 03:32:14 +0000 (19:32 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Fri, 22 Nov 2002 03:32:14 +0000 (19:32 -0800)
commit53bf7bef7cc35c02054aae79d838ace99dcea35b
treef4c4da02be7ef9ab0dae65494163486f564a47cf
parent5fa9d488fb0dbc8b5583be8e59d8b3091fbcb5e9
[PATCH] Remove mapping->vm_writeback

The vm_writeback address_space operation was designed to provide the VM
with a "clustered writeout" capability.  It allowed the filesystem to
perform more intelligent writearound decisions when the VM was trying
to clean a particular page.

I can't say I ever saw any real benefit from this - not much writeout
actually happens on that path - quite a lot of work has gone into
minimising it actually.

The default ->vm_writeback a_op which I provided wrote back the pages
in ->dirty_pages order.  But there is one scenario in which this causes
problems - writing a single 4G file with mem=4G.  We end up with all of
ZONE_NORMAL full of dirty pages, but all writeback effort is against
highmem pages.  (Because there is about 1.5G of dirty memory total).

Net effect: the machine stalls ZONE_NORMAL allocation attempts until
the ->dirty_pages writeback advances onto ZONE_NORMAL pages.

This can be fixed most sweetly with additional radix-tree
infrastructure which will be quite complex.  Later.

So this patch dumps it all, and goes back to using writepage
against individual pages as they come off the LRU.
Documentation/filesystems/Locking
fs/block_dev.c
fs/ext2/inode.c
fs/mpage.c
include/linux/fs.h
include/linux/pagevec.h
mm/page-writeback.c
mm/page_io.c
mm/shmem.c
mm/swap.c
mm/vmscan.c