diff options
author | David Hildenbrand <[email protected]> | 2020-10-15 20:08:15 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-10-16 11:11:17 -0700 |
commit | 4eb29bd9d089977cbf592e53cd074e3c5092fd15 (patch) | |
tree | 48ec20b0c16c56e7f862b03b3ce71a3b324dedda | |
parent | aac65321ba69425badc33f84f5307af7b21ef963 (diff) |
mm/page_alloc: drop stale pageblock comment in memmap_init_zone*()
Commit ac5d2539b238 ("mm: meminit: reduce number of times pageblocks are
set during struct page init") moved the actual zone range check, leaving
only the alignment check for pageblocks.
Let's drop the stale comment and make the pageblock check easier to read.
Signed-off-by: David Hildenbrand <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Wei Yang <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Pankaj Gupta <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Charan Teja Reddy <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Logan Gunthorpe <[email protected]>
Cc: "Matthew Wilcox (Oracle)" <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Michel Lespinasse <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Tony Luck <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/page_alloc.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 19807b688171..7a99ed299443 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6042,13 +6042,8 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, * to reserve their blocks rather than leaking throughout * the address space during boot when many long-lived * kernel allocations are made. - * - * bitmap is created for zone's valid pfn range. but memmap - * can be created for invalid pages (for alignment) - * check here not to call set_pageblock_migratetype() against - * pfn out of zone. */ - if (!(pfn & (pageblock_nr_pages - 1))) { + if (IS_ALIGNED(pfn, pageblock_nr_pages)) { set_pageblock_migratetype(page, MIGRATE_MOVABLE); cond_resched(); } @@ -6111,15 +6106,10 @@ void __ref memmap_init_zone_device(struct zone *zone, * the address space during boot when many long-lived * kernel allocations are made. * - * bitmap is created for zone's valid pfn range. but memmap - * can be created for invalid pages (for alignment) - * check here not to call set_pageblock_migratetype() against - * pfn out of zone. - * * Please note that MEMINIT_HOTPLUG path doesn't clear memmap * because this is done early in section_activate() */ - if (!(pfn & (pageblock_nr_pages - 1))) { + if (IS_ALIGNED(pfn, pageblock_nr_pages)) { set_pageblock_migratetype(page, MIGRATE_MOVABLE); cond_resched(); } |