Re: [PATCH 3/3] sched/fair: Ensure select housekeeping cpus in task_numa_find_cpu

From: K Prateek Nayak
Date: Thu Jan 02 2025 - 00:49:33 EST


Hello Chuyi,

On 12/27/2024 1:29 PM, Chuyi Zhou wrote:
[..snip..]

I think the for_each_cpu_wrap() was used to reduce contention for xchg
operation below. Perhaps we can have a per-cpu temporary mask (like
load_balance_mask) if we want to reduce the xchg contention and break
this into cpumask_and() + for_each_cpu_wrap() steps. I'm not sure if
any of the existing masks (load_balance_mask, select_rq_mask,
should_we_balance_tmpmask) can be safely reused. Otherwise, perhaps we
can make a case for for_each_cpu_and_wrap() with this use case.



for_each_cpu_and_wrap() is a good idea, but it might be slightly off-topic for this subject. Perhaps we should stick with this implementation for now and see what others think about v2.

Sure thing! No strong feeling from my side :)



Thanks.


--
Thanks and Regards,
Prateek