lkml.org 
[lkml]   [2023]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 06/10] sched/fair: Use the prefer_sibling flag of the current sched domain
On Wed, Feb 15, 2023 at 09:21:05PM -0800, Ricardo Neri wrote:

> I tweaked the solution that Dietmar proposed:
>
> - sds->prefer_sibling = child && child->flags & SD_PREFER_SIBLING;
> + if (sds->busiest)
> + sds->prefer_sibling = sds->busiest->flags & SD_PREFER_SIBLING;
>
> This comes from the observation that the prefer_sibling setting acts on
> busiest group. It then depends on whether the busiest group, not the local
> group, has child sched sched domains. Today it works because in most cases
> both the local and the busiest groups have child domains with the SD_
> PREFER_SIBLING flag.
>
> This would also satisfy sched domains with the SD_ASYM_CPUCAPACITY flag as
> prefer_sibling would not be set in that case.
>
> It would also conserve the current behavior at the NUMA level. We would
> not need to implement SD_SPREAD_TASKS.
>
> This would both fix the SMT vs non-SMT bug and be less invasive.
>
> Thoughts?

That does look nice. Be sure to put in a nice comment too.

\
 
 \ /
  Last update: 2023-03-27 00:25    [W:0.059 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site