]> git.baikalelectronics.ru Git - kernel.git/commit
mm, sparse, page_ext: drop ugly N_HIGH_MEMORY branches for allocations
authorMichal Hocko <mhocko@suse.com>
Wed, 6 Sep 2017 23:20:41 +0000 (16:20 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Sep 2017 00:27:26 +0000 (17:27 -0700)
commitdc248574f1cb9bf7c6f30269ecb0c208ae123e43
treeb024100d9cc8525f8dc80cddbc908cb08f5ab17c
parente729733af9a5a67924b770717e296745b20e5510
mm, sparse, page_ext: drop ugly N_HIGH_MEMORY branches for allocations

Commit b269ac5e56c3 ("memory hotplug: alloc page from other node in
memory online") has introduced N_HIGH_MEMORY checks to only use NUMA
aware allocations when there is some memory present because the
respective node might not have any memory yet at the time and so it
could fail or even OOM.

Things have changed since then though.  Zonelists are now always
initialized before we do any allocations even for hotplug (see
2c5fc1670b00 ("mm/memory_hotplug.c: fix building of node hotplug
zonelist")).

Therefore these checks are not really needed.  In fact caller of the
allocator should never care about whether the node is populated because
that might change at any time.

Link: http://lkml.kernel.org/r/20170721143915.14161-10-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Shaohua Li <shaohua.li@intel.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_ext.c
mm/sparse-vmemmap.c
mm/sparse.c