• M
    netvm: allow the use of __GFP_MEMALLOC by specific sockets · 7cb02404
    Mel Gorman 提交于
    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: NMel Gorman <mgorman@suse.de>
    Acked-by: NDavid 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: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    7cb02404
sock.c 67.5 KB