linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v9 0/2] Optimize zone->contiguous update
@ 2026-01-30 16:37 Tianyou Li
  2026-01-30 16:37 ` [PATCH v9 1/2] mm/memory hotplug/unplug: Add online_memory_block_pages() and offline_memory_block_pages() Tianyou Li
  2026-01-30 16:37 ` [PATCH v9 2/2] mm/memory hotplug/unplug: Optimize zone->contiguous update when changes pfn range Tianyou Li
  0 siblings, 2 replies; 13+ messages in thread
From: Tianyou Li @ 2026-01-30 16:37 UTC (permalink / raw)
  To: David Hildenbrand, Oscar Salvador, Mike Rapoport, Wei Yang, Michal Hocko
  Cc: linux-mm, Yong Hu, Nanhai Zou, Yuan Liu, Tim Chen, Qiuxu Zhuo,
	Yu C Chen, Pan Deng, Tianyou Li, Chen Zhang, linux-kernel

This series contains 2 patches. The first one encapsulate the
mhp_init_memmap_on_memory() and online_pages() into
online_memory_block_pages(), the mhp_deinit_memmap_on_memory()
and offline_pages() into offline_memory_block_pages(). Then
move most of memory_block_online() to the new function
mhp_block_online(struct memory_block *block) and correspondingly
memory_block_offline() to mhp_block_offline(struct memory_block *block).
The second one add a fast path to check the zone->contiguous.

Changes History
===============
v9 changes:
   1. Separate the bug fix and optimization into two patches.
   2. This patchset depends on the https://lore.kernel.org/linux-mm/20260130160938.2671462-1-tianyou.li@intel.com/.
   3. Refactor the code to move most of memory_block_online() to
      mhp_block_online() and correspondingly memory_block_offline() to
      mhp_block_offline().

v8 changes:
   1. Rebased to 6.19-rc6
   2. Add online_memory_block_pages() and offline_memory_block_pages()

v7 changes:
   1. Rebased to 6.19-rc1
   2. Reorder the patches so that the fix will be the first in the series.

v6 changes:
   1. Improve coding style.
   2. Add comments.

v5 changes:
   1. Improve coding style.
   2. Fix a issue in which zone->contiguous was always false when adding
      new memory, leveraging the fast path optimization.

v4 changes:
   1. Improve coding style.
   2. Add fast path for zone contiguity check in memory unplugged cases,
      and update test results.
   3. Refactor set_zone_contiguous: the new set_zone_contiguous updates
      zone contiguity based on the fast path results.

v3 changes:
   Add zone contiguity check for empty zones.

v2 changes:
   Add check_zone_contiguous_fast function to check zone contiguity for
   new  memory PFN ranges.

Tianyou Li (2):
  mm/memory hotplug/unplug: Add online_memory_block_pages() and
    offline_memory_block_pages()
  mm/memory hotplug/unplug: Optimize zone->contiguous update when
    changes pfn range

 drivers/base/memory.c          | 115 +-----------------
 include/linux/memory_hotplug.h |  13 +--
 include/linux/mm.h             |   6 +
 mm/internal.h                  |   8 +-
 mm/memory_hotplug.c            | 208 ++++++++++++++++++++++++++++++---
 mm/mm_init.c                   |  15 ++-
 6 files changed, 228 insertions(+), 137 deletions(-)

-- 
2.47.1



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-02-12  8:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-30 16:37 [PATCH v9 0/2] Optimize zone->contiguous update Tianyou Li
2026-01-30 16:37 ` [PATCH v9 1/2] mm/memory hotplug/unplug: Add online_memory_block_pages() and offline_memory_block_pages() Tianyou Li
2026-01-30 16:37 ` [PATCH v9 2/2] mm/memory hotplug/unplug: Optimize zone->contiguous update when changes pfn range Tianyou Li
2026-02-07 11:00   ` David Hildenbrand (Arm)
2026-02-08 19:39     ` Mike Rapoport
2026-02-09 10:52       ` David Hildenbrand (Arm)
2026-02-09 12:44         ` David Hildenbrand (Arm)
2026-02-10 11:44           ` Mike Rapoport
2026-02-10 15:28             ` Li, Tianyou
2026-02-11 12:19             ` David Hildenbrand (Arm)
2026-02-12  8:32               ` Mike Rapoport
2026-02-12  8:45                 ` David Hildenbrand (Arm)
2026-02-09 11:38       ` David Hildenbrand (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox