RFC mm: convert to generic VMA lock-based page fault
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest10 patches 8 repliesIn review
- v1 RFC10 patches 4 repliesSuperseded
Changes in v2 from the cover letter
- convert "int arch_vma_check_access()" to "bool arch_vma_access_error()" still use __weak function for arch_vma_access_error(), which avoid to declare access_error() in architecture's(x86/powerpc/riscv/loongarch) headfile.
- re-use struct vm_fault instead of adding new struct vm_locked_fault, per Matthew Wilcox, add necessary pt_regs/fault error code/vm flags into vm_fault since they could be used in arch_vma_access_error()
- add special VM_FAULT_NONE and make try_vma_locked_page_fault() to return vm_fault_t
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | mm: add a generic VMA lock-based page fault handlerinclude/ include/ mm/ | +58 | 3 replies | |
| 2/10 | arm64: mm: use try_vma_locked_page_fault()arch/ | +22 | 0 replies | |
| 3/10 | x86: mm: use try_vma_locked_page_fault()arch/ | +23 | 0 replies | |
| 4/10 | s390: mm: use try_vma_locked_page_fault()arch/ | +27 | 3 replies | |
| 5/10 | powerpc: mm: use try_vma_locked_page_fault()arch/ | +32 | 2 replies | |
| 6/10 | riscv: mm: use try_vma_locked_page_fault()arch/ | +24 | 0 replies | |
| 7/10 | ARM: mm: try VMA lock-based page fault handling firstarch/ arch/ | +26 | 0 replies | |
| 8/10 | loongarch: mm: cleanup __do_page_fault()arch/ | +16 | 0 replies | |
| 9/10 | loongarch: mm: add access_error() helperarch/ | +20 | 0 replies | |
| 10/10 | loongarch: mm: try VMA lock-based page fault handling firstarch/ arch/ | +32 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH rfc -next v2 00/10] mm: convert to generic VMA lock-based page fault
Add a generic VMA lock-based page fault handler in mm core, and convert architectures to use it, which eliminate architectures's duplicated codes.
With it, we can avoid multiple changes in architectures's code if we add new feature or bugfix, in the end, enable this feature on ARM32 and Loongarch.
This is based on next-20230817, only built test.
v2:
- convert "int arch_vma_check_access()" to "bool arch_vma_access_error()" still use __weak function for arch_vma_access_error(), which avoid to declare access_error() in architecture's(x86/powerpc/riscv/loongarch) headfile.
- re-use struct vm_fault instead of adding new struct vm_locked_fault, per Matthew Wilcox, add necessary pt_regs/fault error code/vm flags into vm_fault since they could be used in arch_vma_access_error()
- add special VM_FAULT_NONE and make try_vma_locked_page_fault() to return vm_fault_t
Kefeng Wang (10):
mm: add a generic VMA lock-based page fault handler
arm64: mm: use try_vma_locked_page_fault()
x86: mm: use try_vma_locked_page_fault()
s390: mm: use try_vma_locked_page_fault()
powerpc: mm: use try_vma_locked_page_fault()
riscv: mm: use try_vma_locked_page_fault()
ARM: mm: try VMA lock-based page fault handling first
loongarch: mm: cleanup __do_page_fault()
loongarch: mm: add access_error() helper
loongarch: mm: try VMA lock-based page fault handling first
arch/arm/Kconfig | 1 + arch/arm/mm/fault.c | 35 ++++++++---- arch/arm64/mm/fault.c | 60 ++++++++------------- arch/loongarch/Kconfig | 1 + arch/loongarch/mm/fault.c | 111 ++++++++++++++++++++++---------------- arch/powerpc/mm/fault.c | 66 +++++++++++------------ arch/riscv/mm/fault.c | 58 +++++++++----------- arch/s390/mm/fault.c | 66 ++++++++++------------- arch/x86/mm/fault.c | 55 ++++++++----------- include/linux/mm.h | 17 ++++++ include/linux/mm_types.h | 2 + mm/memory.c | 39 ++++++++++++++ 12 files changed, 278 insertions(+), 233 deletions(-)
Signature · 1 line
2.27.0