• Andrew Morton's avatar
    [PATCH] blk_congestion_wait tuning and lockup fix · ecc3f712
    Andrew Morton authored
    blk_congestion_wait() will currently not wait if there are no write requests
    in flight.  Which is a potential problem if all the dirty data is against NFS
    filesystems.
    
    For write(2) traffic against NFS, things work nicely, because writers
    throttle in nfs_wait_on_requests().  But for MAP_SHARED dirtyings we need to
    avoid spinning in balance_dirty_pages().  So allow callers to fall through to
    the explicit sleep in that case.
    
    This will also fix a weird lockup which the reiser4 developers report.  In
    that case they have managed to have _all_ inodes against a superblock in
    locked state, yet there are no write requests in flight.  Taking a nap in
    blk_congestion_wait() in this case will yield the CPU to the threads which
    are trying to write out pages.
    
    Also tune up the sleep durations in various callers - 250 milliseconds seems
    rather long.
    ecc3f712
vmscan.c 27.8 KB