aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <[email protected]>2023-10-06 20:53:14 +0100
committerAndrew Morton <[email protected]>2023-10-18 14:34:14 -0700
commit164b06f238b986317131e6b61b2f22aabcbc2cc0 (patch)
tree44cf8d09d2943df9bb5221287c89f30d99042a36 /tools/perf/scripts/python
parent5d74b2ab2c15d596c470bae6626f345d5575a9d0 (diff)
mm: call wp_page_copy() under the VMA lock
It is usually safe to call wp_page_copy() under the VMA lock. The only unsafe situation is when no anon_vma has been allocated for this VMA, and we have to look at adjacent VMAs to determine if their anon_vma can be shared. Since this happens only for the first COW of a page in this VMA, the majority of calls to wp_page_copy() do not need to fall back to the mmap_sem. Add vmf_anon_prepare() as an alternative to anon_vma_prepare() which will return RETRY if we currently hold the VMA lock and need to allocate an anon_vma. This lets us drop the check in do_wp_page(). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Suren Baghdasaryan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions