From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, willy@infradead.org, vbabka@suse.cz,
punit.agrawal@bytedance.com, minchan@google.com,
michel@lespinasse.org, mhocko@suse.com, lstoakes@gmail.com,
Liam.Howlett@Oracle.com, ldufour@linux.ibm.com,
laurent.dufour@fr.ibm.com, josef@toxicpanda.com, jack@suse.cz,
hannes@cmpxchg.org, dave@stgolabs.net, surenb@google.com,
akpm@linux-foundation.org
Subject: [to-be-updated] mm-do-not-increment-pgfault-stats-when-page-fault-handler-retries.patch removed from -mm tree
Date: Fri, 14 Apr 2023 15:22:01 -0700 [thread overview]
Message-ID: <20230414222202.13111C433D2@smtp.kernel.org> (raw)
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
reply other threads:[~2023-04-14 22:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230414222202.13111C433D2@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=Liam.Howlett@Oracle.com \
--cc=dave@stgolabs.net \
--cc=hannes@cmpxchg.org \
--cc=jack@suse.cz \
--cc=josef@toxicpanda.com \
--cc=laurent.dufour@fr.ibm.com \
--cc=ldufour@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lstoakes@gmail.com \
--cc=mhocko@suse.com \
--cc=michel@lespinasse.org \
--cc=minchan@google.com \
--cc=mm-commits@vger.kernel.org \
--cc=punit.agrawal@bytedance.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.