Skip to content

mm: fix max_pfn not falling on section boundary

David Hildenbrand linux-fsdevel linux-mm lkml stable 2 versions – Applied

Status from this message: [merged] mm-initialize-memmap-of-unavailable-memory-directly.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesApplied 3/3
  2. v13 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- "mm: fix uninitialized memmaps on a partially populated last section" -- Refine patch description (esp. how to reproduce), add tested-by
- "fs/proc/page.c: allow inspection of last section and fix end detection" -- Make it compile for !CONFIG_SPARSE and add a comment to the new helper function

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3mm: fix uninitialized memmaps on a partially populated last sectionmm/page_alloc.c+12 -22 repliesApplied
2/3fs/proc/page.c: allow inspection of last section and fix end detectionfs/proc/page.c+27 -30 repliesApplied
3/3mm: initialize memmap of unavailable memory directlyinclude/linux/mm.h mm/page_alloc.c+22 -170 repliesApplied

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchDaniel Jordan
1/3T-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] mm: fix max_pfn not falling on section boundary

Playing with different memory sizes for a x86-64 guest, I discovered that some memmaps (highest section if max_mem does not fall on the section boundary) are marked as being valid and online, but contain garbage. We have to properly initialize these memmaps.

Looking at /proc/kpageflags and friends, I found some more issues, partially related to this.

v1 -> v2:
- "mm: fix uninitialized memmaps on a partially populated last section" -- Refine patch description (esp. how to reproduce), add tested-by
- "fs/proc/page.c: allow inspection of last section and fix end detection" -- Make it compile for !CONFIG_SPARSE and add a comment to the new helper function

David Hildenbrand (3):
mm: fix uninitialized memmaps on a partially populated last section fs/proc/page.c: allow inspection of last section and fix end detection
mm: initialize memmap of unavailable memory directly

 fs/proc/page.c     | 30 +++++++++++++++++++++++++++---
 include/linux/mm.h |  6 ------
 mm/page_alloc.c    | 43 ++++++++++++++++++++++++++++++++-----------
 3 files changed, 59 insertions(+), 20 deletions(-)
Signature · 1 line
2.23.0