• Andrew Morton's avatar
    [PATCH] reduce lock contention in do_pagecache_readahead · cd016d80
    Andrew Morton authored
    Anton Blanchard has a workload (the SDET benchmark) which is showing some
    moderate lock contention in do_pagecache_readahead().
    
    Seems that SDET has many threads performing seeky reads against a
    cached file.  The average number of pagecache probes in a single
    do_pagecache_readahead() is six, which seems reasonable.
    
    The patch (from Anton) flips the locking around to optimise for the
    fast case (page was present).  So the kernel takes the lock less often,
    and does more work once it has been acquired.
    cd016d80
readahead.c 9.77 KB