Re: [PATCHv3 1/9] sched: Add static_key for asymmetric cpu capacity optimizations

From: Quentin Perret
Date: Fri Jun 22 2018 - 04:22:32 EST


Hi Morten,

On Wednesday 20 Jun 2018 at 10:05:41 (+0100), Morten Rasmussen wrote:
> +static void update_asym_cpucapacity(int cpu)
> +{
> + int enable = false;
> +
> + rcu_read_lock();
> + if (lowest_flag_domain(cpu, SD_ASYM_CPUCAPACITY))
> + enable = true;
> + rcu_read_unlock();
> +
> + if (enable) {
> + /* This expects to be hotplug-safe */
> + static_branch_enable_cpuslocked(&sched_asym_cpucapacity);
> + }
> +}

What would happen if you hotplugged an entire cluster ? You'd loose the
SD_ASYM_CPUCAPACITY flag but keep the static key is that right ? Should
we care ?

And also, Peter mentioned an issue with the EAS patches with multiple
root_domains. Does that apply here as well ? What if you had a
configuration with big and little CPUs in different root_domains for ex?

Should we disable the static key in the above cases ?

Thanks,
Quentin