Re: [PATCH v3 08/20] sched/fair: load balance only among preferred CPUs
From: Shrikanth Hegde
Date: Tue Jun 09 2026 - 07:38:49 EST
On 6/9/26 4:52 PM, Peter Zijlstra wrote:
On Thu, Jun 04, 2026 at 06:37:48PM +0530, Shrikanth Hegde wrote:
Hi Prateek.
On 6/4/26 11:39 AM, K Prateek Nayak wrote:
Hello Shrikanth,
... just moving set_cpu_preferred() into sched_cpu_activate() and
sched_cpu_deactivate() instead of doing it at set_cpu_online().
Ah ok. Will move it there. I think this should be ok.
Right, such that preferred is a strict subset of active.
preferred ⊆ active ⊆ online ⊆ present ⊆ possible
Ok. This can be met i think.
In addition to this and in the dec/incr of preferred CPUs if i plug active mask instead of online, and disable make it same as active the above construct can be met i think. I will give that a try.
That might make it better w.r.t to CPU hotplug too. less races.