mm: drop meminit_pfn_in_nid as it is redundant
As best as I can tell the meminit_pfn_in_nid call is completely redundant.
The deferred memory initialization is already making use of
for_each_free_mem_range which in turn will call into __next_mem_range
which will only return a memory range if it matches the node ID provided
assuming it is not NUMA_NO_NODE.
I am operating on the assumption that there are no zones or pgdata_t
structures that have a NUMA node of NUMA_NO_NODE associated with them. If
that is the case then __next_mem_range will never return a memory range
that doesn't match the zone's node ID and as such the check is redundant.
So one piece I would like to verify on this is if this works for ia64.
Technically it was using a different approach to get the node ID, but it
seems to have the node ID also encoded into the memblock. So I am
assuming this is okay, but would like to get confirmation on that.
On my x86_64 test system with 384GB of memory per node I saw a reduction
in initialization time from 2.80s to 1.85s as a result of this patch.
Signed-off-by: Alexander Duyck <firstname.lastname@example.org>
Reviewed-by: Pavel Tatashin <email@example.com>
Acked-by: Michal Hocko <firstname.lastname@example.org>
Cc: Mike Rapoport <email@example.com>
Cc: Dan Williams <firstname.lastname@example.org>
Cc: Dave Jiang <email@example.com>
Cc: David S. Miller <firstname.lastname@example.org>
Cc: Ingo Molnar <email@example.com>
Cc: Khalid Aziz <firstname.lastname@example.org>
Cc: "Kirill A. Shutemov" <email@example.com>
Cc: Laurent Dufour <firstname.lastname@example.org>
Cc: Matthew Wilcox <email@example.com>
Cc: Mel Gorman <firstname.lastname@example.org>
Cc: Mike Rapoport <email@example.com>
Cc: Pavel Tatashin <firstname.lastname@example.org>
Cc: Vlastimil Babka <email@example.com>
Signed-off-by: Andrew Morton <firstname.lastname@example.org>
Signed-off-by: Linus Torvalds <email@example.com>
1 file changed