Re: [PATCH v3 04/10] sched/fair: Let low-priority cores help high-priority busy SMT cores
From: Peter Zijlstra
Date: Fri Feb 10 2023 - 03:41:49 EST
On Thu, Feb 09, 2023 at 04:43:33PM -0800, Ricardo Neri wrote:
> On Thu, Feb 09, 2023 at 12:53:41PM +0100, Peter Zijlstra wrote:
> > On Wed, Feb 08, 2023 at 08:56:32AM +0100, Vincent Guittot wrote:
> >
> > > > + if (env->sd->flags & SD_SHARE_CPUCAPACITY ||
> > > > + (!(env->sd->flags & SD_SHARE_CPUCAPACITY) && is_core_idle(i)))
> > >
> > > This 2nd if could be merged with the upper one
> >
> > Wasn't this exact same condition used in the previous patch as well?
> > Does it wants to be a helper perhaps?
>
> Patch 3 focuses on the destination CPU: make sure that it and its SMT
> siblings are idle before attempting to do asym_packing balance.
>
> This patch focuses on the busiest group: if the busiest group is an SMT
> core with more than one busy sibling, help it even if it has higher
> priority.
Yeah, so? If its a recurring expression a helper never hurts.