madvise anon_name cleanups
Status from this message: [merged mm-stable] mm-madvise-use-standard-madvise-locking-in-madvise_set_anon_name.patch removed from -mm tree
Get series with b4
b4 am [email protected] change-id 20250623-anon_name_cleanup-e89b687038edVersions newest first
- v2 Latest4 patches 20 repliesApplied 4/4
- v1 RFC2 patches 10 repliesSuperseded
Changes in v2 from the cover letter
- Refactor madvise_update_vma() to select between vma_modify_flags() and vma_modify_flags_name() based on Lorenzo's suggestion. This should
also address Suren's concerns.
- Reduce the code move from kernel/sys.c to code handling PR_SET_VMA_ANON_NAME, per Lorenzo.
- Added patches 3, 4 to unify mm locking.
- Link to v1: https://patch.msgid.link/[email protected]
Patches in v2 All 4 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mm, madvise: simplify anon_name handlingmm/ | +13 | 7 replies | Applied |
| 2/4 | mm, madvise: extract mm code from prctl_set_vma() to mm/madvise.cinclude/ kernel/ mm/ | +58 | 3 replies | Applied |
| 3/4 | mm, madvise: move madvise_set_anon_name() down the filemm/ | +32 | 5 replies | Applied |
| 4/4 | mm, madvise: use standard madvise locking in madvise_set_anon_name()mm/ | +9 | 5 replies | Applied |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | David Hildenbrand | Suren Baghdasaryan | Lorenzo Stoakes |
|---|---|---|---|
| 1/4 | A-b | R-b | R-b |
| 2/4 | A-b | R-b | R-b |
| 3/4 | A-b | R-b | R-b |
| 4/4 | A-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 0/4] madvise anon_name cleanups
While reviewing Lorenzo's madvise cleanups I've noticed that we can handle anon_name in madvise code much better, so sending that as patch
1. Initially I wanted to do first move the existing logic from madvise_vma_behavior() to madvise_update_vma() as a separate patch before the actual simplification but that would require adding anon_vma_name_put() in error handling paths only to be removed again, so it's a single patch to avoid churn.
It's also an opportunity to move some mm code from prctl under mm, hence patch 2. After code moving preparation in patch 3, also unify madvise lock handling for madvise_set_anon_name() in patch 4.
Based on mm-new.
Taking the RFC off as concerns from RFC should be addressed, but not without risk as patches 3+4 are new. Due to rewrite of patch 1 I didn't keep Suren's R-b (but thanks!).
---
Changes in v2:
- Refactor madvise_update_vma() to select between vma_modify_flags() and vma_modify_flags_name() based on Lorenzo's suggestion. This should
also address Suren's concerns.
- Reduce the code move from kernel/sys.c to code handling PR_SET_VMA_ANON_NAME, per Lorenzo.
- Added patches 3, 4 to unify mm locking.
- Link to v1: https://patch.msgid.link/[email protected]
---
Vlastimil Babka (4):
mm, madvise: simplify anon_name handling
mm, madvise: extract mm code from prctl_set_vma() to mm/madvise.c mm, madvise: move madvise_set_anon_name() down the file mm, madvise: use standard madvise locking in madvise_set_anon_name()
include/linux/mm.h | 14 ++--- kernel/sys.c | 50 +---------------- mm/madvise.c | 154 ++++++++++++++++++++++++++++++++++------------------- 3 files changed, 106 insertions(+), 112 deletions(-)
---
base-commit: 4216fd45fc9156da0ee33fcb25cc0a5265049e32
change-id: 20250623-anon_name_cleanup-e89b687038ed
Best regards,
Signature · 1 line
Vlastimil Babka <[email protected]>