mm-shmem-swap-fix-major-fault-counting.patch removed from -mm tree
The quilt patch titled
Subject: mm/shmem, swap: fix major fault counting
has been removed from the -mm tree. Its filename was
mm-shmem-swap-fix-major-fault-counting.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: Kairui Song <[email protected]>
Subject: mm/shmem, swap: fix major fault counting
Date: Mon, 28 Jul 2025 15:53:06 +0800
If the swapin failed, don't update the major fault count. There is a long existing comment for doing it this way, now with previous cleanups, we can finally fix it.
Signed-off-by Kairui Song <[email protected]>
Reviewed-by Baolin Wang <[email protected]>
Cc Baoquan He <[email protected]>
Cc Barry Song <[email protected]>
Cc Chris Li <[email protected]>
Cc Dev Jain <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Kemeng Shi <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>
Cc Nhat Pham <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/shmem.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
mm/shmem.c renamed from mm/shmem.c~mm-shmem-swap-fix-major-fault-counting +5 -7
@@ -2356,13 +2356,6 @@ static int shmem_swapin_folio(struct ino/* Look it up and read it in.. */ folio =swap_cache_get_folio (swap,NULL ,0 );if (!folio) { -/* Or update major stats only when swapin succeeds?? */ -if (fault_type) { - *fault_type |=VM_FAULT_MAJOR ; -count_vm_event (PGMAJFAULT ); -count_memcg_event_mm (fault_mm,PGMAJFAULT ); - } -if (data_race (si->flags &SWP_SYNCHRONOUS_IO )) {/* Direct swapin skipping swap cache & readahead */ folio = shmem_swap_alloc_folio(inode, vma, index,
@@ -2381,6 +2374,11 @@ static int shmem_swapin_folio(struct ino goto failed; } } +if (fault_type) { + *fault_type |=VM_FAULT_MAJOR ; +count_vm_event (PGMAJFAULT ); +count_memcg_event_mm (fault_mm,PGMAJFAULT ); + } }if (order >folio_order (folio)) {
_
Patches currently in -mm which might be from [email protected] are