Yang Shi fe53ca5427 mm: use early_pfn_to_nid in page_ext_init
page_ext_init() checks suitable pages with pfn_to_nid(), but
pfn_to_nid() depends on memmap which will not be setup fully until
page_alloc_init_late() is done.  Use early_pfn_to_nid() instead of
pfn_to_nid() so that page extension could be still used early even
though CONFIG_ DEFERRED_STRUCT_PAGE_INIT is enabled and catch early page
allocation call sites.

Suggested by Joonsoo Kim [1], this fix basically undoes the change
introduced by commit b8f1a75d61d840 ("mm: call page_ext_init() after all
struct pages are initialized") and fixes the same problem with a better
approach.

[1] http://lkml.kernel.org/r/CAAmzW4OUmyPwQjvd7QUfc6W1Aic__TyAuH80MLRZNMxKy0-wPQ@mail.gmail.com

Link: http://lkml.kernel.org/r/1464198689-23458-1-git-send-email-yang.shi@linaro.org
Signed-off-by: Yang Shi <yang.shi@linaro.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-27 14:49:37 -07:00
..
2015-11-05 19:34:48 -08:00
2016-05-26 20:00:28 -07:00
2015-06-24 17:49:45 -07:00
2016-05-23 11:18:01 -07:00
2016-05-23 11:18:01 -07:00
2016-05-23 17:04:14 -07:00
2016-03-17 15:09:34 -07:00
2016-05-26 20:00:28 -07:00
2015-09-08 15:35:28 -07:00
2016-05-23 17:04:14 -07:00
2016-03-17 15:09:34 -07:00
2015-11-05 19:34:48 -08:00
2016-05-23 17:04:14 -07:00
2016-03-17 15:09:34 -07:00
2016-05-19 15:20:54 -06:00
2016-05-23 17:04:14 -07:00
2016-05-20 17:58:30 -07:00