lkml.org 
[lkml]   [2021]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/4] sched/fair: Optimize checking for group_asym_packing
On Tue, Apr 13, 2021 at 07:04:33PM -0700, Ricardo Neri wrote:
> By checking local_group, we can avoid additional checks and invoking
> sched_asmy_prefer() when it is not needed.

This really could do with a few words on *why* that is correct. ISTR
thinking this made sense when I last looked at it, but today, after
having the brain reset by not looking at a computer for 4 days its not
immediate obvious anymore.

> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
> ---
> kernel/sched/fair.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 04a3ce20da67..4ef3fa0d5e8d 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -8455,7 +8455,7 @@ static inline void update_sg_lb_stats(struct lb_env *env,
> }
>
> /* Check if dst CPU is idle and preferred to this group */
> - if (env->sd->flags & SD_ASYM_PACKING &&
> + if (!local_group && env->sd->flags & SD_ASYM_PACKING &&
> env->idle != CPU_NOT_IDLE &&
> sgs->sum_h_nr_running &&
> sched_asym_prefer(env->dst_cpu, group->asym_prefer_cpu)) {
> --
> 2.17.1
>

\
 
 \ /
  Last update: 2021-05-03 11:26    [W:0.107 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site