Re: [PATCH v3 4/6] sched/fair: Carve out logic to mark a group for asymmetric packing
From: Ricardo Neri <hidden>
Date: 2021-05-18 19:19:20
From: Ricardo Neri <hidden>
Date: 2021-05-18 19:19:20
On Mon, May 17, 2021 at 04:21:36PM +0200, Dietmar Eggemann wrote:
On 13/05/2021 17:49, Ricardo Neri wrote: [...]quoted
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c8c04e9d0d3b..c8b66a5d593e 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c@@ -8447,6 +8447,20 @@ group_type group_classify(unsigned int imbalance_pct, return group_has_spare; } +static inline bool +sched_asym(struct lb_env *env, struct sd_lb_stats *sds, struct sg_lb_stats *sgs, + struct sched_group *group) +{ + /* + * Because sd->groups starts with the local group, anything that isn't + * the local group will have access to the local state. + */ + if (group == sds->local) + return false;sched_asym() is called under if(!local_group ...) from update_sg_lb_stats(). So why checking this here again?
This is true. It looks to me that this check is not needed. I makes sense to me to keep the check in update_sg_lb_stats() so that we can avoid the extra checks, right? Thanks and BR, Ricardo