• Andrew Morton's avatar
    [PATCH] Remove mapping->vm_writeback · 53bf7bef
    Andrew Morton authored
    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.
    53bf7bef
page-writeback.c 16.4 KB