linux-stable/include
Michal Hocko 3e59fcb0e8 hugetlb: add support for preferred node to alloc_huge_page_nodemask
alloc_huge_page_nodemask tries to allocate from any numa node in the
allowed node mask starting from lower numa nodes.  This might lead to
filling up those low NUMA nodes while others are not used.  We can
reduce this risk by introducing a concept of the preferred node similar
to what we have in the regular page allocator.  We will start allocating
from the preferred nid and then iterate over all allowed nodes in the
zonelist order until we try them all.

This is mimicing the page allocator logic except it operates on per-node
mempools.  dequeue_huge_page_vma already does this so distill the
zonelist logic into a more generic dequeue_huge_page_nodemask and use it
in alloc_huge_page_nodemask.

This will allow us to use proper per numa distance fallback also for
alloc_huge_page_node which can use alloc_huge_page_nodemask now and we
can get rid of alloc_huge_page_node helper which doesn't have any user
anymore.

Link: http://lkml.kernel.org/r/20170622193034.28972-3-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Tested-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.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>
2017-07-10 16:32:32 -07:00
..
acpi arm64 updates for 4.13: 2017-07-05 17:09:27 -07:00
asm-generic powerpc updates for 4.13 2017-07-07 13:55:45 -07:00
clocksource
crypto
drm main drm pull for v4.13 2017-07-09 18:48:37 -07:00
dt-bindings This is the bulk of GPIO changes for the v4.13 series: 2017-07-07 12:40:27 -07:00
keys
kvm
linux hugetlb: add support for preferred node to alloc_huge_page_nodemask 2017-07-10 16:32:32 -07:00
math-emu
media main drm pull for v4.13 2017-07-09 18:48:37 -07:00
memory
misc cxl: Export library to support IBM XSL 2017-07-03 23:07:03 +10:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-07-08 12:01:22 -07:00
pcmcia
ras
rdma Fixes #3 for 4.12-rc 2017-07-06 11:45:08 -07:00
rxrpc
scsi SCSI misc on 20170704 2017-07-06 12:10:33 -07:00
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
sound ASoC: Updates for v4.13 2017-07-03 19:51:42 +02:00
target
trace mm/oom_kill.c: add tracepoints for oom reaper-related events 2017-07-10 16:32:32 -07:00
uapi main drm pull for v4.13 2017-07-09 18:48:37 -07:00
video
xen This is the first pull request for the new dma-mapping subsystem 2017-07-06 19:20:54 -07:00