Skip to content

Deferred page init improvements

Alexander Duyck linux-mm linux-nvdimm lkml nvdimm sparclinux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v7 Latest4 patches 1 replyIn review

Changes in v7 from the cover letter

Updated MAX_ORDER_NR_PAGES patch to stop on section aligned boundaries Dropped patches 5-7
Will follow-up later with reserved bit rework before resubmitting

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mm: Use mm_zero_struct_page from SPARC on all 64b architecturesarch/sparc/include/asm/pgtable_64.h include/linux/mm.h+38 -330 replies
2/4mm: Drop meminit_pfn_in_nid as it is redundantmm/page_alloc.c+14 -370 replies
3/4mm: Implement new zone specific memblock iteratorinclude/linux/memblock.h mm/memblock.c mm/page_alloc.c+101 -191 reply
4/4mm: Initialize MAX_ORDER_NR_PAGES at a time instead of doing larger sectionsinclude/linux/memblock.h mm/page_alloc.c+137 -410 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPavel TatashinMichal HockoMike Rapoport
1/4R-b A-b
2/4R-b A-b
3/4R-b R-b
4/4R-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.

Read the v7 thread

Cover letter [mm PATCH v7 0/4] Deferred page init improvements

This patchset is essentially a refactor of the page initialization logic that is meant to provide for better code reuse while providing a significant improvement in deferred page initialization performance.

In my testing on an x86_64 system with 384GB of RAM I have seen the following. In the case of regular memory initialization the deferred init time was decreased from 3.75s to 1.38s on average. This amounts to a 172% improvement for the deferred memory initialization performance.

I have called out the improvement observed with each patch.

v1->v2:
Fixed build issue on PowerPC due to page struct size being 56 Added new patch that removed __SetPageReserved call for hotplug
v2->v3:
Rebased on latest linux-next
Removed patch that had removed __SetPageReserved call from init Added patch that folded __SetPageReserved into set_page_links Tweaked __init_pageblock to use start_pfn to get section_nr instead of pfn
v3->v4:
Updated patch description and comments for mm_zero_struct_page patch
Replaced "default" with "case 64"
Removed #ifndef mm_zero_struct_page
Fixed typo in comment that ommited "_from" in kerneldoc for iterator Added Reviewed-by for patches reviewed by Pavel
Added Acked-by from Michal Hocko
Added deferred init times for patches that affect init performance Swapped patches 5 & 6, pulled some code/comments from 4 into 5
v4->v5:
Updated Acks/Reviewed-by
Rebased on latest linux-next
Split core bits of zone iterator patch from MAX_ORDER_NR_PAGES init
v5->v6:
Rebased on linux-next with previous v5 reverted
Drop the "This patch" or "This change" from patch descriptions. Cleaned up patch descriptions for patches 3 & 4
Fixed kerneldoc for __next_mem_pfn_range_in_zone
Updated several Reviewed-by, and incorporated suggestions from Pavel Added __init_single_page_nolru to patch 5 to consolidate code Refactored iterator in patch 7 and fixed several issues
v6->v7:
Updated MAX_ORDER_NR_PAGES patch to stop on section aligned boundaries Dropped patches 5-7
Will follow-up later with reserved bit rework before resubmitting

---

Alexander Duyck (4):
mm: Use mm_zero_struct_page from SPARC on all 64b architectures
mm: Drop meminit_pfn_in_nid as it is redundant
mm: Implement new zone specific memblock iterator
mm: Initialize MAX_ORDER_NR_PAGES at a time instead of doing larger sections

 arch/sparc/include/asm/pgtable_64.h |   30 -----
 include/linux/memblock.h            |   41 +++++++
 include/linux/mm.h                  |   41 ++++++-
 mm/memblock.c                       |   64 ++++++++++
 mm/page_alloc.c                     |  218 ++++++++++++++++++++++-------------
 5 files changed, 277 insertions(+), 117 deletions(-)

--