Skip to contentSkip to conversation

mm-khugepaged-support-shmem-mthp-copy.patch removed from -mm tree

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

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: khugepaged: support shmem mTHP copy
has been removed from the -mm tree. Its filename was
mm-khugepaged-support-shmem-mthp-copy.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: Baolin Wang <[email protected]>
Subject: mm: khugepaged: support shmem mTHP copy
Date: Tue, 20 Aug 2024 17:49:15 +0800

Iterate each subpage in the large folio to copy, as preparation for supporting shmem mTHP collapse.

---

 mm/khugepaged.c |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
mm/khugepaged.c renamed from mm/khugepaged.c~mm-khugepaged-support-shmem-mthp-copy +10 -5
@@ -2056,17 +2056,22 @@ xa_unlocked:
 	index = start;
 	dst = folio_page(new_folio, 0);
 	list_for_each_entry(folio, &pagelist, lru) {
+		int i, nr_pages = folio_nr_pages(folio);
+
 		while (index < folio->index) {
 			clear_highpage(dst);
 			index++;
 			dst++;
 		}
-		if (copy_mc_highpage(dst, folio_page(folio, 0)) > 0) {
-			result = SCAN_COPY_MC;
-			goto rollback;
+
+		for (i = 0; i < nr_pages; i++) {
+			if (copy_mc_highpage(dst, folio_page(folio, i)) > 0) {
+				result = SCAN_COPY_MC;
+				goto rollback;
+			}
+			index++;
+			dst++;
 		}
-		index++;
-		dst++;
 	}
 	while (index < end) {
 		clear_highpage(dst);

_

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