[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0h=Jeb5JjjE9vNQM29xYAy-Ogmx1mycRv-hPJ1+m=edzw@mail.gmail.com>
Date: Tue, 10 Apr 2018 10:00:01 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: yuankuiz@...eaurora.org
Cc: Linux PM <linux-pm@...r.kernel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Frederic Weisbecker <fweisbec@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
aulmck@...ux.vnet.ibm.com, Ingo Molnar <mingo@...nel.org>,
Len Brown <len.brown@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Subject: [PATCH] [PATCH] time: tick-sched: use bool for tick_stopped
On Tue, Apr 10, 2018 at 9:33 AM, <yuankuiz@...eaurora.org> wrote:
> From: John Zhao <yuankuiz@...eaurora.org>
>
> Variable tick_stopped returned by tick_nohz_tick_stopped
> can have only true / forse values. Since the return type
> of the tick_nohz_tick_stopped is also bool, variable
> tick_stopped nice to have data type as bool in place of int.
> Moreover, the executed instructions cost could be minimal
> without potiential data type conversion.
>
> Signed-off-by: John Zhao <yuankuiz@...eaurora.org>
> ---
> kernel/time/tick-sched.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/time/tick-sched.h b/kernel/time/tick-sched.h
> index 6de959a..4d34309 100644
> --- a/kernel/time/tick-sched.h
> +++ b/kernel/time/tick-sched.h
> @@ -48,8 +48,8 @@ struct tick_sched {
> unsigned long check_clocks;
> enum tick_nohz_mode nohz_mode;
>
> + bool tick_stopped : 1;
> unsigned int inidle : 1;
> - unsigned int tick_stopped : 1;
> unsigned int idle_active : 1;
> unsigned int do_timer_last : 1;
> unsigned int got_idle_tick : 1;
I don't think this is a good idea at all.
Please see https://lkml.org/lkml/2017/11/21/384 for example.
Thanks!
Powered by blists - more mailing lists