aboutsummaryrefslogtreecommitdiff
path: root/mm/memory.c
diff options
context:
space:
mode:
authorGravatar Suren Baghdasaryan <surenb@google.com> 2023-02-27 09:36:27 -0800
committerGravatar Andrew Morton <akpm@linux-foundation.org> 2023-04-05 20:03:01 -0700
commit52f238653e452e0fda61e880f263a173d219acd1 (patch)
tree199cd083cb781048caaea10f3301280fcc7d2540 /mm/memory.c
parentmm: prevent userfaults to be handled under per-vma lock (diff)
downloadlinux-52f238653e452e0fda61e880f263a173d219acd1.tar.gz
linux-52f238653e452e0fda61e880f263a173d219acd1.tar.bz2
linux-52f238653e452e0fda61e880f263a173d219acd1.zip
mm: introduce per-VMA lock statistics
Add a new CONFIG_PER_VMA_LOCK_STATS config option to dump extra statistics about handling page fault under VMA lock. Link: https://lkml.kernel.org/r/20230227173632.3292573-29-surenb@google.com Signed-off-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 55ac9cdfd398..9999574a9636 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -5284,6 +5284,7 @@ retry:
/* Check if the VMA got isolated after we found it */
if (vma->detached) {
vma_end_read(vma);
+ count_vm_vma_lock_event(VMA_LOCK_MISS);
/* The area was replaced with another one */
goto retry;
}
@@ -5292,6 +5293,7 @@ retry:
return vma;
inval:
rcu_read_unlock();
+ count_vm_vma_lock_event(VMA_LOCK_ABORT);
return NULL;
}
#endif /* CONFIG_PER_VMA_LOCK */