lkml.org 
[lkml]   [2022]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v7] sched/fair: Consider cpu affinity when allowing NUMA imbalance in find_idlest_group
Date
On 10/06/22 16:15, Peter Zijlstra wrote:
> On Fri, Jun 10, 2022 at 11:55:37AM +0100, Valentin Schneider wrote:
>>
>> IIUC we want to pay special attention when the task isn't allowed to run on
>> all online CPUs, wouldn't the below do that?
>>
>> !cpumask_subset(cpu_online_mask, p->cpus_ptr)
>
> At that point we might just as well do the whole cpumask_and() thing,
> no? There's not much cost difference between these two operations.
>

Yeah, you got a point there.

>> The task affinity can be a superset of the online mask, obvious case is
>> init_task's CPU_MASK_ALL, and the above test is still false if both masks
>> are equal.
>>
>> (Additionnaly we could add a step in sched_init() to "properly" initialize
>> the init_task mask and remove the NR_CPUS faff).
>
> I'm confused, NR_CPUS is the right value for CPU_MASK_ALL.

Right, I meant to make the mask match cpu_online_mask from the get go, but
now that I allocate a few more neurons thinking about it it looks like a
can of worms; we'd have to do that after smp_init() to see which CPUs we
actually onlined, and by then we have already forked around.

\
 
 \ /
  Last update: 2022-06-10 18:27    [W:0.067 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site