diff options
| author | Wei Yang <[email protected]> | 2025-02-07 10:04:53 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-03-17 05:06:09 +0000 |
| commit | 8d9a2f5d8abd3ba4355f25e60827c1ee082cd215 (patch) | |
| tree | b65b8c87947a97ada4d22265faa36a42dcdfd68f /mm/mm_init.c | |
| parent | mm: use READ/WRITE_ONCE() for vma->vm_flags on migrate, mprotect (diff) | |
| download | kernel-8d9a2f5d8abd3ba4355f25e60827c1ee082cd215.tar.gz kernel-8d9a2f5d8abd3ba4355f25e60827c1ee082cd215.zip | |
mm/mm_init.c: use round_up() to align movable range
Since MAX_ORDER_NR_PAGES is power of 2, let's use a faster version.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Wei Yang <[email protected]>
Reviewed-by: Anshuman Khandual <[email protected]>
Reviewed-by: Mike Rapoport (Microsoft) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/mm_init.c')
| -rw-r--r-- | mm/mm_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mm_init.c b/mm/mm_init.c index 2630cc30147e..de18d3ad12e1 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -438,7 +438,7 @@ static void __init find_zone_movable_pfns_for_nodes(void) * was requested by the user */ required_movablecore = - roundup(required_movablecore, MAX_ORDER_NR_PAGES); + round_up(required_movablecore, MAX_ORDER_NR_PAGES); required_movablecore = min(totalpages, required_movablecore); corepages = totalpages - required_movablecore; @@ -549,7 +549,7 @@ out2: unsigned long start_pfn, end_pfn; zone_movable_pfn[nid] = - roundup(zone_movable_pfn[nid], MAX_ORDER_NR_PAGES); + round_up(zone_movable_pfn[nid], MAX_ORDER_NR_PAGES); get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); if (zone_movable_pfn[nid] >= end_pfn) |
