linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] mm/mempolicy: Add memory hotplug support in weighted interleave
@ 2025-03-07  6:35 Rakie Kim
  2025-03-07  6:35 ` [PATCH 1/4] mm/mempolicy: Support memory hotplug " Rakie Kim
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Rakie Kim @ 2025-03-07  6:35 UTC (permalink / raw)
  To: gourry
  Cc: akpm, linux-mm, linux-kernel, linux-cxl, joshua.hahnjy,
	dan.j.williams, ying.huang, kernel_team, honggyu.kim,
	yunjeong.mun, rakie.kim

This patch series enhances the weighted interleave policy in mempolicy
to support memory hotplug, ensuring that newly added memory nodes are
properly recognized and integrated into the weighted interleave mechanism.

The weighted interleave policy distributes page allocations across
multiple NUMA nodes based on their performance weight, optimizing memory
bandwidth utilization. The weight values for each node are configured
through sysfs. However, the existing implementation only created sysfs
entries at initialization, leading to the following issues:

Unnecessary sysfs entries: Nodes without memory were included in sysfs
at boot.
Missing hotplug support: Nodes that became online after initialization
were not recognized, causing incomplete interleave configurations.
To resolve these issues, the first patch introduces two key changes:

Filtered sysfs creation at initialization Only nodes that are online
and have memory are registered.
Dynamic sysfs updates for hotplugged nodes  New memory nodes are
recognized and integrated via the memory hotplug mechanism.
Subsequent patches refine this functionality:

Patch 2: Enables sysfs registration for memory nodes added via hotplug.
Patch 3: Fixes a race condition that caused duplicate sysfs entries when
registering interleave settings.
Patch 4: Ensures proper deallocation of kobjects and memory, preventing
resource leaks in mempolicy_sysfs_init().
With these changes, the weighted interleave policy can dynamically adapt
to memory hotplug events, improving NUMA memory management and system
stability.

Patch Summary
[PATCH 1/4] mm/mempolicy: Support memory hotplug in weighted interleave
Adds dynamic sysfs integration for memory hotplug in weighted interleave.
[PATCH 2/4] mm/mempolicy: Enable sysfs support for memory hotplug in
weighted interleave
Implements sysfs attribute registration for newly detected memory nodes.
[PATCH 3/4] mm/mempolicy: Fix duplicate node addition in sysfs for
weighted interleave
Prevents redundant sysfs entries when configuring interleave settings.
[PATCH 4/4] mm/mempolicy: Fix memory leaks in mempolicy_sysfs_init()
Ensures proper kobject and memory deallocation to prevent resource leaks.

These patches have been tested to ensure correct memory node detection,
proper sysfs updates, and stability improvements in memory hotplug scenarios.

 mm/mempolicy.c | 172 +++++++++++++++++++++++++++++++++++--------------
 1 file changed, 122 insertions(+), 50 deletions(-)


base-commit: 7eb172143d5508b4da468ed59ee857c6e5e01da6
-- 
2.34.1



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

end of thread, other threads:[~2025-03-12  8:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-07  6:35 [PATCH 0/4] mm/mempolicy: Add memory hotplug support in weighted interleave Rakie Kim
2025-03-07  6:35 ` [PATCH 1/4] mm/mempolicy: Support memory hotplug " Rakie Kim
2025-03-07  6:35 ` [PATCH 2/4] mm/mempolicy: Enable sysfs support for " Rakie Kim
2025-03-07 18:19   ` Joshua Hahn
2025-03-10  8:28     ` Rakie Kim
2025-03-07  6:35 ` [PATCH 3/4] mm/mempolicy: Fix duplicate node addition in sysfs for " Rakie Kim
2025-03-07  6:35 ` [PATCH 4/4] mm/mempolicy: Fix memory leaks in mempolicy_sysfs_init() Rakie Kim
2025-03-07 15:23   ` Gregory Price
2025-03-10  8:23     ` Rakie Kim
2025-03-07 15:56 ` [PATCH 0/4] mm/mempolicy: Add memory hotplug support in weighted interleave Gregory Price
2025-03-07 21:55   ` Gregory Price
2025-03-10  9:03     ` Rakie Kim
2025-03-10 14:13       ` Gregory Price
2025-03-12  8:18         ` Rakie Kim
2025-03-10  9:03   ` Rakie Kim

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