Skip to content

mm: introduce snapshot_page()

Luiz Capitulino linux-mm lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 13 repliesIn review 3 of 4 applied
  2. v24 patches 12 repliesSuperseded
  3. v13 patches 10 repliesSuperseded

Changes in v3 from the cover letter

- Small snapshot_page() refactor to simplify and fix stack-out-of-bugs bug reported by Harry Yoo
- Use clear_compound_head() in snapshot_page() (Shivank)
- Read head pointer from ps->page_snapshot() for tail page case (Shivank)
- Improve comments and macro name in snapshot_page() (David)

Patches in v3 3 of 4 applied

#Subject and filesSizeRepliesApplied
1/4mm/memory: introduce is_huge_zero_pfn() and use it in vm_normal_page_pmd()include/linux/huge_mm.h mm/memory.c+12 -21 replyApplied
2/4mm/util: introduce snapshot_page()include/linux/mm.h mm/debug.c mm/util.c+102 -386 replies
3/4proc: kpagecount: use snapshot_page()fs/proc/page.c+17 -43 repliesApplied
4/4fs: stable_page_flags(): use snapshot_page()fs/proc/page.c+13 -161 replyApplied

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchOscar SalvadorShivank GargHarry YooDavid Hildenbrand
SeriesR-b T-b
1/4R-b
2/4A-b
3/4A-b
4/4A-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 4 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/4] mm: introduce snapshot_page()

Hi,

The series introduction will follow the changelog. This is against bc9ff192a6c9 .

Changelog
=========

v2 -> v3
- Small snapshot_page() refactor to simplify and fix stack-out-of-bugs bug reported by Harry Yoo
- Use clear_compound_head() in snapshot_page() (Shivank)
- Read head pointer from ps->page_snapshot() for tail page case (Shivank)
- Improve comments and macro name in snapshot_page() (David)

v1 -> v2
- Include is_huge_zero_pfn() patch and use it (David)
- Move free page detection to snapshot_page() (David)
- Changelog improvements (Shivank)
- Added Acked-bys

RFC -> v1
- Include <linux/page_idle.h> to avoid build error on sh arch

Introduction
============

This series introduces snapshot_page(), a helper function that can be used to create a snapshot of a struct page and its associated struct folio.

This function is intended to help callers with a consistent view of a a folio while reducing the chance of encountering partially updated or inconsistent state, such as during folio splitting which could lead to crashes and BUG_ON()s being triggered.

David Hildenbrand (1):
mm/memory: introduce is_huge_zero_pfn() and use it in
vm_normal_page_pmd()

Luiz Capitulino (3):
mm/util: introduce snapshot_page()
proc: kpagecount: use snapshot_page()
fs: stable_page_flags(): use snapshot_page()

 fs/proc/page.c          | 50 +++++++++++++++-----------
 include/linux/huge_mm.h | 12 ++++++-
 include/linux/mm.h      | 19 ++++++++++
 mm/debug.c              | 42 +++-------------------
 mm/memory.c             |  2 +-
 mm/util.c               | 79 +++++++++++++++++++++++++++++++++++++++++
 6 files changed, 144 insertions(+), 60 deletions(-)
Signature · 1 line
2.50.0