mbox series

[v3,00/10] Handle most file-backed faults under the VMA lock

Message ID 20230724185410.1124082-1-willy@infradead.org (mailing list archive)
Headers show
Series Handle most file-backed faults under the VMA lock | expand

Message

Matthew Wilcox July 24, 2023, 6:54 p.m. UTC
This patchset adds the ability to handle page faults on parts of files
which are already in the page cache without taking the mmap lock.

Several people have volunteered to run benchmarks on this, so I haven't.
I am running it through xfstests and it hasn't appear to introduce any
regressions so far.

This patchset is against next-20230724.

v3:
 - Remove the reversion and reapplication of Arjun Roy's patch;
   "Remove CONFIG_PER_VMA_LOCK ifdefs" is brought to the front, and
   Arjun's patch is instead fixed.
 - Add the missing pte_unmap() pointed out by Jann Horn
 - Do not call ->huge_fault under the VMA lock, also pointed out by Jann
 - Add the last two patches that handle faults on existing PTEs
 - Add R-b from Suren (for the patches that remained intact)
 - Better wording in commit messages

Matthew Wilcox (Oracle) (10):
  mm: Remove CONFIG_PER_VMA_LOCK ifdefs
  mm: Allow per-VMA locks on file-backed VMAs
  mm: Move FAULT_FLAG_VMA_LOCK check from handle_mm_fault()
  mm: Handle PUD faults under the VMA lock
  mm: Handle some PMD faults under the VMA lock
  mm: Move FAULT_FLAG_VMA_LOCK check down in handle_pte_fault()
  mm: Move FAULT_FLAG_VMA_LOCK check down from do_fault()
  mm: Run the fault-around code under the VMA lock
  mm: Handle swap and NUMA PTE faults under the VMA lock
  mm: Handle faults that merely update the accessed bit under the VMA
    lock

 MAINTAINERS             |  1 -
 arch/arm64/mm/fault.c   |  2 -
 arch/powerpc/mm/fault.c |  4 --
 arch/riscv/mm/fault.c   |  4 --
 arch/s390/mm/fault.c    |  2 -
 arch/x86/mm/fault.c     |  4 --
 include/linux/mm.h      |  6 +++
 include/linux/net_mm.h  | 17 --------
 include/net/tcp.h       |  1 -
 mm/hugetlb.c            |  6 +++
 mm/memory.c             | 97 +++++++++++++++++++++++++++++------------
 net/ipv4/tcp.c          | 11 ++---
 12 files changed, 86 insertions(+), 69 deletions(-)
 delete mode 100644 include/linux/net_mm.h