Skip to contentSkip to conversation

mm-vmalloc-add-optimization-hint-on-page-existence-check.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 2, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: vmalloc: add optimization hint on page existence check
has been removed from the -mm tree. Its filename was
mm-vmalloc-add-optimization-hint-on-page-existence-check.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: Miao Wang <[email protected]>
Subject: mm: vmalloc: add optimization hint on page existence check
Date: Wed, 14 Aug 2024 01:12:13 +0800

In commit 21e516b913c1 ("mm: vmalloc: dump page owner info if page is already mapped"), a BUG_ON macro was changed into an if statement, where the compiler optimization hint introduced in the BUG_ON macro was removed along with this change. This patch adds back the hint.

Fixes 21e516b913c1 ("mm: vmalloc: dump page owner info if page is already mapped")
Cc Christoph Hellwig <[email protected]>
Cc Hariom Panthi <[email protected]>
Cc "Uladzislau Rezki (Sony)" <[email protected]>

---

 mm/vmalloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmalloc.c renamed from mm/vmalloc.c~mm-vmalloc-add-optimization-hint-on-page-existence-check +1 -1
@@ -105,7 +105,7 @@ static int vmap_pte_range(pmd_t *pmd, un
 	if (!pte)
 		return -ENOMEM;
 	do {
-		if (!pte_none(ptep_get(pte))) {
+		if (unlikely(!pte_none(ptep_get(pte)))) {
 			if (pfn_valid(pfn)) {
 				page = pfn_to_page(pfn);
 				dump_page(page, "remapping already mapped page");

_

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