On 05.06.25 16:22, Oscar Salvador wrote:
> cpuset is only concerned when a numa node changes its memory state,
> as it needs to know the current numa nodes with memory to keep
> an updated mems_allowed mask.
> So stop using the memory notifier and use the new numa node notifer
> instead.
>
> Signed-off-by: Oscar Salvador <osalvador@suse.de>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
> Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> kernel/cgroup/cpuset.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index 83639a12883d..66c84024f217 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -4013,7 +4013,7 @@ void __init cpuset_init_smp(void)
> cpumask_copy(top_cpuset.effective_cpus, cpu_active_mask);
> top_cpuset.effective_mems = node_states[N_MEMORY];
>
> - hotplug_memory_notifier(cpuset_track_online_nodes, CPUSET_CALLBACK_PRI);
> + hotplug_node_notifier(cpuset_track_online_nodes, CPUSET_CALLBACK_PRI);
Interestingly, cpuset_track_online_nodes() is only concerned about
"after node_states[N_MEMORY] change", so maybe we could filter out more
events .. maybe.
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb