• Mel Gorman's avatar
    nbd: set SOCK_MEMALLOC for access to PFMEMALLOC reserves · 7f338fe4
    Mel Gorman authored
    Set SOCK_MEMALLOC on the NBD socket to allow access to PFMEMALLOC reserves
    so pages backed by NBD, particularly if swap related, can be cleaned to
    prevent the machine being deadlocked.  It is still possible that the
    PFMEMALLOC reserves get depleted resulting in deadlock but this can be
    resolved by the administrator by increasing min_free_kbytes.
    Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
    Cc: David Miller <davem@davemloft.net>
    Cc: Neil Brown <neilb@suse.de>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Mike Christie <michaelc@cs.wisc.edu>
    Cc: Eric B Munson <emunson@mgebm.net>
    Cc: Eric Dumazet <eric.dumazet@gmail.com>
    Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
    Cc: Mel Gorman <mgorman@suse.de>
    Cc: Christoph Lameter <cl@linux.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    7f338fe4
nbd.c 20.7 KB