* [to-be-updated] mm-do-not-increment-pgfault-stats-when-page-fault-handler-retries.patch removed from -mm tree
@ 2023-04-14 22:22 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-04-14 22:22 UTC (permalink / raw)
To: mm-commits, willy, vbabka, punit.agrawal, minchan, michel, mhocko,
lstoakes, Liam.Howlett, ldufour, laurent.dufour, josef, jack,
hannes, dave, surenb, akpm
The quilt patch titled
Subject: mm: do not increment pgfault stats when page fault handler retries
has been removed from the -mm tree. Its filename was
mm-do-not-increment-pgfault-stats-when-page-fault-handler-retries.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------
From: Suren Baghdasaryan <surenb@google.com>
Subject: mm: do not increment pgfault stats when page fault handler retries
Date: Fri, 14 Apr 2023 10:54:44 -0700
If the page fault handler requests a retry, we will count the fault
multiple times. This is a relatively harmless problem as the retry paths
are not often requested, and the only user-visible problem is that the
fault counter will be slightly higher than it should be. Nevertheless,
userspace only took one fault, and should not see the fact that the kernel
had to retry the fault multiple times.
Link: https://lkml.kernel.org/r/20230414175444.1837474-1-surenb@google.com
Fixes: d065bd810b6d ("mm: retry page fault when blocking on disk transfer")
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jan Kara <jack@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: kernel-team@android.com
Cc: Laurent Dufour <laurent.dufour@fr.ibm.com>
Cc: Laurent Dufour <ldufour@linux.ibm.com>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Lorenzo Stoakes <lstoakes@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Michel Lespinasse <michel@lespinasse.org>
Cc: Minchan Kim <minchan@google.com>
Cc: Punit Agrawal <punit.agrawal@bytedance.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memory.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
--- a/mm/memory.c~mm-do-not-increment-pgfault-stats-when-page-fault-handler-retries
+++ a/mm/memory.c
@@ -5197,17 +5197,16 @@ vm_fault_t handle_mm_fault(struct vm_are
__set_current_state(TASK_RUNNING);
- count_vm_event(PGFAULT);
- count_memcg_event_mm(vma->vm_mm, PGFAULT);
-
ret = sanitize_fault_flags(vma, &flags);
if (ret)
- return ret;
+ goto out;
if (!arch_vma_access_permitted(vma, flags & FAULT_FLAG_WRITE,
flags & FAULT_FLAG_INSTRUCTION,
- flags & FAULT_FLAG_REMOTE))
- return VM_FAULT_SIGSEGV;
+ flags & FAULT_FLAG_REMOTE)) {
+ ret = VM_FAULT_SIGSEGV;
+ goto out;
+ }
/*
* Enable the memcg OOM handling for faults triggered in user
@@ -5238,6 +5237,11 @@ vm_fault_t handle_mm_fault(struct vm_are
}
mm_account_fault(regs, address, flags, ret);
+out:
+ if (!(ret & VM_FAULT_RETRY)) {
+ count_vm_event(PGFAULT);
+ count_memcg_event_mm(vma->vm_mm, PGFAULT);
+ }
return ret;
}
_
Patches currently in -mm which might be from surenb@google.com are
mm-handle-swap-page-faults-if-the-faulting-page-can-be-locked.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-14 22:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14 22:22 [to-be-updated] mm-do-not-increment-pgfault-stats-when-page-fault-handler-retries.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.