Skip to contentSkip to conversation

khugepage-replace-lru_cache_add-with-folio_add_lru.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Dec 12, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: khugepage: replace lru_cache_add() with folio_add_lru()
has been removed from the -mm tree. Its filename was
khugepage-replace-lru_cache_add-with-folio_add_lru.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: "Vishal Moola (Oracle)" <[email protected]>
Subject: khugepage: replace lru_cache_add() with folio_add_lru()
Date: Tue, 1 Nov 2022 10:53:25 -0700

Replaces some calls with their folio equivalents. This is in preparation for the removal of lru_cache_add(). This replaces 3 calls to compound_head() with 1.

---

 mm/khugepaged.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
mm/khugepaged.c renamed from mm/khugepaged.c~khugepage-replace-lru_cache_add-with-folio_add_lru +7 -4
@@ -2013,6 +2013,7 @@ xa_unlocked:
 
 	if (result == SCAN_SUCCEED) {
 		struct page *page, *tmp;
+		struct folio *folio;
 
 		/*
 		 * Replacing old pages with new one has succeeded, now we
@@ -2040,11 +2041,13 @@ xa_unlocked:
 			index++;
 		}
 
-		SetPageUptodate(hpage);
-		page_ref_add(hpage, HPAGE_PMD_NR - 1);
+		folio = page_folio(hpage);
+		folio_mark_uptodate(folio);
+		folio_ref_add(folio, HPAGE_PMD_NR - 1);
+
 		if (is_shmem)
-			set_page_dirty(hpage);
-		lru_cache_add(hpage);
+			folio_mark_dirty(folio);
+		folio_add_lru(folio);
 
 		/*
 		 * Remove pte page tables, so we can re-fault the page as huge.

_

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