Batch unmap of uffd-wp file folios
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 2 repliesIn review 2 of 3 applied
- v13 patches 7 repliesSuperseded
Changes in v2 from the cover letter
- Move declaration to mm/internal.h
- Use two tabs for parameter indentation, use for(;;) established pattern for batch setting of ptes
Patches in v2 2 of 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | mm/memory: move pte_install_uffd_wp_if_needed() into memory.cinclude/ mm/ mm/ | +63 | 1 reply | |
| 2/3 | mm/memory: batch set uffd-wp markers during zappingmm/ mm/ mm/ | +29 | 1 reply | Applied |
| 3/3 | mm/rmap: batch unmap file folios belonging to uffd-wp VMAsmm/ | +2 | 0 replies | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | David Hildenbrand (Arm) |
|---|---|
| 1/3 | A-b |
| 2/3 | A-b |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] Batch unmap of uffd-wp file folios
Currently, batched unmapping is supported if:
1) folio is a file folio, not belonging to uffd-wp VMA
2) folio is anonymous and not swapbacked (lazyfree), not belonging to uffd-wp VMA
So the cases which are not supported are
1) folio belonging to uffd-wp VMA
2) folio is anonymous and swapbacked
It is easy to see that this adds a lot of cognitive load while reading try_to_unmap_one - we need to remember throughout whether nr_pages == 1 or > 1.
The uffd-wp handling in try_to_unmap_one is regarding preserving the uffd-wp state for file folios via pte_install_uffd_wp_if_needed (for anon folio, we handle that while constructing the swap pte).
Stop special casing on uffd-wp VMAs by simply adding batching support to pte_install_uffd_wp_if_needed.
---v1->v2:
- Move declaration to mm/internal.h
- Use two tabs for parameter indentation, use for(;;) established pattern for batch setting of ptes
This is a split from:
https://lore.kernel.org/all/[email protected]/
mm-selftests pass.
Dev Jain (3):
mm/memory: move pte_install_uffd_wp_if_needed() into memory.c mm/memory: batch set uffd-wp markers during zapping mm/rmap: batch unmap file folios belonging to uffd-wp VMAs
include/linux/mm_inline.h | 53 ------------------------ mm/internal.h | 4 ++ mm/memory.c | 85 ++++++++++++++++++++++++++++++--------- mm/rmap.c | 6 +-- 4 files changed, 73 insertions(+), 75 deletions(-)
Signature · 1 line
2.43.0