• Mel Gorman's avatar
    netvm: allow the use of __GFP_MEMALLOC by specific sockets · 7cb02404
    Mel Gorman authored
    Allow specific sockets to be tagged SOCK_MEMALLOC and use __GFP_MEMALLOC
    for their allocations.  These sockets will be able to go below watermarks
    and allocate from the emergency reserve.  Such sockets are to be used to
    service the VM (iow.  to swap over).  They must be handled kernel side,
    exposing such a socket to user-space is a bug.
    
    There is a risk that the reserves be depleted so for now, the
    administrator is responsible for increasing min_free_kbytes as necessary
    to prevent deadlock for their workloads.
    
    [a.p.zijlstra@chello.nl: Original patches]
    Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
    Acked-by: default avatarDavid S. 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>
    7cb02404
sock.h 61.2 KB