lkml.org 
[lkml]   [2018]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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 :-)

\
 
 \ /
  Last update: 2018-02-16 14:47    [W:0.212 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site