Skip to contentSkip to conversation

mm-mm_initc-remove-unneeded-calc_memmap_size.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Apr 26, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/mm_init.c: remove unneeded calc_memmap_size()
has been removed from the -mm tree. Its filename was
mm-mm_initc-remove-unneeded-calc_memmap_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: Baoquan He <[email protected]>
Subject: mm/mm_init.c: remove unneeded calc_memmap_size()
Date: Mon, 25 Mar 2024 22:56:45 +0800

Nobody calls calc_memmap_size() now.

---

 mm/mm_init.c |   20 --------------------
 1 file changed, 20 deletions(-)
mm/mm_init.c renamed from mm/mm_init.c~mm-mm_initc-remove-unneeded-calc_memmap_size +0 -20
@@ -1332,26 +1332,6 @@ static void __init calculate_node_totalp
 	pr_debug("On node %d totalpages: %lu\n", pgdat->node_id, realtotalpages);
 }
 
-static unsigned long __init calc_memmap_size(unsigned long spanned_pages,
-						unsigned long present_pages)
-{
-	unsigned long pages = spanned_pages;
-
-	/*
-	 * Provide a more accurate estimation if there are holes within
-	 * the zone and SPARSEMEM is in use. If there are holes within the
-	 * zone, each populated memory region may cost us one or two extra
-	 * memmap pages due to alignment because memmap pages for each
-	 * populated regions may not be naturally aligned on page boundary.
-	 * So the (present_pages >> 4) heuristic is a tradeoff for that.
-	 */
-	if (spanned_pages > present_pages + (present_pages >> 4) &&
-	    IS_ENABLED(CONFIG_SPARSEMEM))
-		pages = present_pages;
-
-	return PAGE_ALIGN(pages * sizeof(struct page)) >> PAGE_SHIFT;
-}
-
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 static void pgdat_init_split_queue(struct pglist_data *pgdat)
 {

_

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

documentation-kdump-clean-up-the-outdated-description.patch kexec-fix-the-unexpected-kexec_dprintk-macro.patch crash-add-prefix-for-crash-dumping-messages.patch