mm-shmem-add-thp-validation-for-pmd-mapped-thp-related-statistics.patch removed from -mm tree
The quilt patch titled
Subject: mm: shmem: add THP validation for PMD-mapped THP related statistics
has been removed from the -mm tree. Its filename was
mm-shmem-add-thp-validation-for-pmd-mapped-thp-related-statistics.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: shmem: add THP validation for PMD-mapped THP related statistics
Date: Tue, 11 Jun 2024 18:11:06 +0800
In order to extend support for mTHP, add THP validation for PMD-mapped THP related statistics to avoid statistical confusion.
---
mm/shmem.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
mm/shmem.c renamed from mm/shmem.c~mm-shmem-add-thp-validation-for-pmd-mapped-thp-related-statistics +4 -3
@@ -1647,7 +1647,7 @@ static struct folio *shmem_alloc_and_addreturn ERR_PTR (-E2BIG ); folio =shmem_alloc_folio (gfp,HPAGE_PMD_ORDER , info, index); -if (!folio) +if (!folio && pages ==HPAGE_PMD_NR )count_vm_event (THP_FILE_FALLBACK ); }else { pages =1 ;
@@ -1665,7 +1665,7 @@ static struct folio *shmem_alloc_and_addif (xa_find (&mapping->i_pages, &index, index + pages -1 ,XA_PRESENT )) { error = -EEXIST ; - }else if (huge) { + }else if (pages ==HPAGE_PMD_NR ) {count_vm_event (THP_FILE_FALLBACK );count_vm_event (THP_FILE_FALLBACK_CHARGE ); }
@@ -2031,7 +2031,8 @@ repeat: folio =shmem_alloc_and_add_folio (huge_gfp, inode, index, fault_mm, true);if (!IS_ERR (folio)) { -count_vm_event (THP_FILE_ALLOC ); +if (folio_test_pmd_mappable (folio)) +count_vm_event (THP_FILE_ALLOC ); goto alloced; }if (PTR_ERR (folio) == -EEXIST )
_
Patches currently in -mm which might be from [email protected] are