Re: [PATCH 5/8] sched/fair: Make check_misfit_status() only compare dynamic capacities

From: Dietmar Eggemann
Date: Thu Feb 04 2021 - 05:50:35 EST


On 03/02/2021 16:15, Qais Yousef wrote:
> On 01/28/21 18:31, Valentin Schneider wrote:

[...]

>> @@ -10238,7 +10236,7 @@ static void nohz_balancer_kick(struct rq *rq)
>> * When ASYM_CPUCAPACITY; see if there's a higher capacity CPU
>> * to run the misfit task on.
>> */
>> - if (check_misfit_status(rq, sd)) {
>> + if (check_misfit_status(rq)) {

Since check_misfit_status() doesn't need sd anymore it looks like that
rcu_dereference(per_cpu(sd_asym_cpucapacity, cpu)) could be replaced by
static_branch_unlikely(&sched_asym_cpucapacity)) in nohz_balancer_kick().

But as you mentioned in an earlier conversation we do need to check sd
because of asymmetric CPU capacity systems w/ exclusive cpusets which
could create symmetric islands (unique capacity_orig among CPUs).

Maybe worth putting a comment here (similar to the one in sis()) so
people don't try to optimize?