Skip to content

mm: zone & pgdat accessors plus some cleanup

Cody P Schafer linux-mm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 8 repliesIn review
  2. v117 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- drop zone+pgdat growth factoring (I use this in some WIP code to resign the NUMA node a page belongs to, will send with that patchset)
- merge zone_end_pfn() & zone_spans_pfn() introduction & usage
- split zone_is_initialized() & zone_is_empty() out from the above.
- add a missing semicolon

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9mm: add SECTION_IN_PAGE_FLAGSinclude/linux/mm.h+6 -22 replies
2/9mm: add & use zone_end_pfn() and zone_spans_pfn()include/linux/mmzone.h mm/compaction.c mm/kmemleak.c +3 more+32 -270 replies
3/9mm: add zone_is_empty() and zone_is_initialized()include/linux/mmzone.h+10 -00 replies
4/9mm/page_alloc: add a VM_BUG in __free_one_page() if the zone is uninitialized.mm/page_alloc.c+2 -00 replies
5/9mmzone: add pgdat_{end_pfn,is_empty}() helpers & consolidate.include/linux/mmzone.h+10 -41 reply
6/9mm/page_alloc: add informative debugging message in page_outside_zone_boundaries()mm/page_alloc.c+7 -03 replies
7/9mm: add helper ensure_zone_is_initialized()mm/memory_hotplug.c+11 -00 replies
8/9mm/memory_hotplug: use ensure_zone_is_initialized()mm/memory_hotplug.c+10 -190 replies
9/9mm/memory_hotplug: use pgdat_end_pfn() instead of open coding the same.mm/memory_hotplug.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/9] mm: zone & pgdat accessors plus some cleanup

Summaries:
1 - avoid repeating checks for section in page flags by adding a define. 2 - add & switch to zone_end_pfn() and zone_spans_pfn()
3 - adds zone_is_initialized() & zone_is_empty()
4 - adds a VM_BUG using zone_is_initialized() in __free_one_page() 5 - add pgdat_end_pfn() and pgdat_is_empty()
6 - add debugging message to VM_BUG check.
7 - add ensure_zone_is_initialized() (for memory_hotplug)
8 - use the above addition in memory_hotplug
9 - use pgdat_end_pfn()

As a general concern: spanned_pages & start_pfn (in pgdat & zone) are supposed to be locked (via a seqlock) when read (due to changes to them via memory_hotplug), but very few (only 1?) of their users appear to actually lock them.

--

Since v1:
- drop zone+pgdat growth factoring (I use this in some WIP code to resign the NUMA node a page belongs to, will send with that patchset)
- merge zone_end_pfn() & zone_spans_pfn() introduction & usage
- split zone_is_initialized() & zone_is_empty() out from the above.
- add a missing semicolon

 include/linux/mm.h     |  8 ++++++--
 include/linux/mmzone.h | 34 +++++++++++++++++++++++++++++----
 mm/compaction.c        | 10 +++++-----
 mm/kmemleak.c          |  5 ++---
 mm/memory_hotplug.c    | 52 ++++++++++++++++++++++++++------------------------
 mm/page_alloc.c        | 31 +++++++++++++++++-------------
 mm/vmstat.c            |  2 +-
 7 files changed, 89 insertions(+), 53 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>