By checking local_group, we can avoid additional checks and invoking sched_asmy_prefer() when it is not needed.
Cc: Aubrey Li <[email protected]> Cc: Ben Segall <[email protected]> Cc: Daniel Bristot de Oliveira <[email protected]> Cc: Dietmar Eggemann <[email protected]> Cc: Joel Fernandes (Google) <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Quentin Perret <[email protected]> Cc: Srinivas Pandruvada <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Tim Chen <[email protected]> Reviewed-by: Len Brown <[email protected]> Signed-off-by: Ricardo Neri <[email protected]> --- Changes since v1: * None --- 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

