]> git.baikalelectronics.ru Git - kernel.git/commit
mm: fix GFP_THISNODE callers and clarify
authorJohannes Weiner <hannes@cmpxchg.org>
Mon, 10 Mar 2014 22:49:43 +0000 (15:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Mar 2014 00:26:19 +0000 (17:26 -0700)
commite1c06881d6827bc535bd9a56fc166095d3347746
tree37b58e8435cd1fc0f207ba51791da88b7488c749
parent16d43e4e459369e0b109d72ce3cce0439be325e1
mm: fix GFP_THISNODE callers and clarify

GFP_THISNODE is for callers that implement their own clever fallback to
remote nodes.  It restricts the allocation to the specified node and
does not invoke reclaim, assuming that the caller will take care of it
when the fallback fails, e.g.  through a subsequent allocation request
without GFP_THISNODE set.

However, many current GFP_THISNODE users only want the node exclusive
aspect of the flag, without actually implementing their own fallback or
triggering reclaim if necessary.  This results in things like page
migration failing prematurely even when there is easily reclaimable
memory available, unless kswapd happens to be running already or a
concurrent allocation attempt triggers the necessary reclaim.

Convert all callsites that don't implement their own fallback strategy
to __GFP_THISNODE.  This restricts the allocation a single node too, but
at the same time allows the allocator to enter the slowpath, wake
kswapd, and invoke direct reclaim if necessary, to make the allocation
happen when memory is full.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Jan Stancek <jstancek@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/ia64/kernel/uncached.c
arch/powerpc/platforms/cell/ras.c
drivers/misc/sgi-xp/xpc_uv.c
include/linux/gfp.h
include/linux/mmzone.h
include/linux/slab.h
kernel/profile.c
mm/migrate.c