• Huang Ying's avatar
    mm: don't use radix tree writeback tags for pages in swap cache · 371a096e
    Huang Ying authored
    File pages use a set of radix tree tags (DIRTY, TOWRITE, WRITEBACK,
    etc.) to accelerate finding the pages with a specific tag in the radix
    tree during inode writeback.  But for anonymous pages in the swap cache,
    there is no inode writeback.  So there is no need to find the pages with
    some writeback tags in the radix tree.  It is not necessary to touch
    radix tree writeback tags for pages in the swap cache.
    
    Per Rik van Riel's suggestion, a new flag AS_NO_WRITEBACK_TAGS is
    introduced for address spaces which don't need to update the writeback
    tags.  The flag is set for swap caches.  It may be used for DAX file
    systems, etc.
    
    With this patch, the swap out bandwidth improved 22.3% (from ~1.2GB/s to
    ~1.48GBps) in the vm-scalability swap-w-seq test case with 8 processes.
    The test is done on a Xeon E5 v3 system.  The swap device used is a RAM
    simulated PMEM (persistent memory) device.  The improvement comes from
    the reduced contention on the swap ca...
    371a096e
page-writeback.c 84.3 KB