[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180809104549.GS2494@hirez.programming.kicks-ass.net>
Date: Thu, 9 Aug 2018 12:45:49 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Leo Yan <leo.yan@...aro.org>
Cc: Ingo Molnar <mingo@...hat.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched: idle: Reenable sched tick for cpuidle request
On Thu, Aug 09, 2018 at 01:47:27PM +0800, Leo Yan wrote:
> diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
> index 1a3e9bd..802286e 100644
> --- a/kernel/sched/idle.c
> +++ b/kernel/sched/idle.c
> @@ -190,10 +190,18 @@ static void cpuidle_idle_call(void)
> */
> next_state = cpuidle_select(drv, dev, &stop_tick);
>
> - if (stop_tick)
> + if (stop_tick) {
> tick_nohz_idle_stop_tick();
> - else
> + } else {
> + /*
> + * The cpuidle framework says to not stop tick but
> + * the tick has been stopped yet, so restart it.
> + */
> + if (tick_nohz_tick_stopped())
> + tick_nohz_idle_restart_tick();
> +
I suspect you want an 'else' here. restart_tick already calls
timer_clear_idle().
> tick_nohz_idle_retain_tick();
> + }
>
However, I would rather we stuff all this into retain_tick.
Powered by blists - more mailing lists