[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210321193037.7o3mqcmwjthbos7n@e107158-lin>
Date: Sun, 21 Mar 2021 19:30:37 +0000
From: Qais Yousef <qais.yousef@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: valentin.schneider@....com, tglx@...utronix.de, mingo@...nel.org,
bigeasy@...utronix.de, swood@...hat.com, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com, vincent.donnefort@....com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] cpumask: Introduce DYING mask
On 03/10/21 15:53, Peter Zijlstra wrote:
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -160,6 +160,9 @@ static int cpuhp_invoke_callback(unsigne
> int (*cb)(unsigned int cpu);
> int ret, cnt;
>
> + if (bringup != !cpu_dying(cpu))
nit: this condition is hard to read
> + set_cpu_dying(cpu, !bringup);
since cpu_dying() will do cpumask_test_cpu(), are we saving much if we
unconditionally call set_cpu_dying(cpu, !bringup) which performs
cpumask_{set, clear}_cpu()?
> +
> if (st->fail == state) {
> st->fail = CPUHP_INVALID;
> return -EAGAIN;
Thanks
--
Qais yousef
Powered by blists - more mailing lists