[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180216134704.GE25201@hirez.programming.kicks-ass.net>
Date: Fri, 16 Feb 2018 14:47:04 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Morten Rasmussen <morten.rasmussen@....com>
Cc: mingo@...hat.com, valentin.schneider@....com,
dietmar.eggemann@....com, vincent.guittot@...aro.org,
linux-kernel@...r.kernel.org
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 :-)
Powered by blists - more mailing lists