| Date | Fri, 16 Feb 2018 14:47:04 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH 1/7] sched: Add static_key for asymmetric cpu capacity optimizations |
| |
On Thu, Feb 15, 2018 at 04:20:48PM +0000, Morten Rasmussen wrote: > +static void update_asym_cpucapacity(int cpu) > +{ > + if (!static_branch_unlikely(&sched_asym_cpucapacity) && > + lowest_flag_domain(cpu, SD_ASYM_CPUCAPACITY)) > + static_branch_enable(&sched_asym_cpucapacity); > +}
That looks odd, why not just:
if (lowest_flag_domain(cpu, SD_ASYM_CPUCAPACITY)) static_branch_enable(&sched_asym_cpucapacity);
? possibly with:
else static_branch_disable(&sched_asym_cpucapacity);
if you want to play funny games :-)
|