Skip to contentSkip to conversation

mm-mm_initc-use-round_up-to-calculate-usermap-size.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Mar 17, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/mm_init.c: use round_up() to calculate usermap size
has been removed from the -mm tree. Its filename was
mm-mm_initc-use-round_up-to-calculate-usermap-size.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Wei Yang <[email protected]>
Subject: mm/mm_init.c: use round_up() to calculate usermap size
Date: Wed, 12 Feb 2025 01:38:18 +0000

Since pageblock_nr_pages and BITS_PER_LONG are power of 2, we could use round_up() to calculate it.

Also we have renamed blockflags to pageblock_flags, adjust the comment accordingly.

---

 mm/mm_init.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
mm/mm_init.c renamed from mm/mm_init.c~mm-mm_initc-use-round_up-to-calculate-usermap-size +3 -3
@@ -1431,7 +1431,7 @@ void __meminit init_currently_empty_zone
 
 #ifndef CONFIG_SPARSEMEM
 /*
- * Calculate the size of the zone->blockflags rounded to an unsigned long
+ * Calculate the size of the zone->pageblock_flags rounded to an unsigned long
  * Start by making sure zonesize is a multiple of pageblock_order by rounding
  * up. Then use 1 NR_PAGEBLOCK_BITS worth of bits per pageblock, finally
  * round what is now in bits to nearest long in bits, then return it in
@@ -1442,10 +1442,10 @@ static unsigned long __init usemap_size(
 	unsigned long usemapsize;
 
 	zonesize += zone_start_pfn & (pageblock_nr_pages-1);
-	usemapsize = roundup(zonesize, pageblock_nr_pages);
+	usemapsize = round_up(zonesize, pageblock_nr_pages);
 	usemapsize = usemapsize >> pageblock_order;
 	usemapsize *= NR_PAGEBLOCK_BITS;
-	usemapsize = roundup(usemapsize, BITS_PER_LONG);
+	usemapsize = round_up(usemapsize, BITS_PER_LONG);
 
 	return usemapsize / BITS_PER_BYTE;
 }

_

Patches currently in -mm which might be from [email protected] are

lib-rbtree-enable-userland-test-suite-for-rbtree-related-data-structure.patch lib-rbtree-split-tests.patch
lib-rbtree-add-random-seed.patch lib-interval_tree-add-test-case-for-interval_tree_iter_xxx-helpers.patch lib-interval_tree-add-test-case-for-span-iteration.patch lib-interval_tree-skip-the-check-before-go-to-the-right-subtree.patch lib-interval_tree-fix-the-comment-of-interval_tree_span_iter_next_gap.patch