Re: [PATCH] sched/topology: Disable sched_asym_cpucapacity on domain destruction

From: Valentin Schneider
Date: Mon Oct 14 2019 - 09:47:03 EST

(Replying to the reply because for some reason my mail client never got
your reply?!)

On 14/10/2019 14:29, Vincent Guittot wrote:
> On Mon, 14 Oct 2019 at 14:16, Quentin Perret <qperret@xxxxxxxxxx> wrote:
>> FWIW we already clear the EAS static key properly (based on the sd
>> pointer, not the static key), so this is really only for the
>> capacity-aware stuff.

Ah, right.

>> So what happens it you have mutiple root domains ? You might skip
>> build_sched_domains() for one of them and end up not setting the static
>> key when you should no ?
>> I suppose an alternative would be to play with static_branch_inc() /
>> static_branch_dec() from build_sched_domains() or something along those
>> lines.

Hmph, so I went with the concept that having the key set should mandate
having a non-NULL sd_asym_cpucapacity domain, which is why I unset it as
soon as one CPU gets attached to a NULL domain.

Sadly as you pointed out, this doesn't work if we have another root domain
that sees asymmetry. It also kinda sounds broken to have SDs of a root
domain that does not see asymmetry (e.g. LITTLEs only) to see that key
being set. Maybe what we want is to have a key per root domain?

>> Thanks,
>> Quentin