Re: [PATCH 12/13] nohz: Allow all CPUs outside nohz_full range to dotimekeeping

From: Paul E. McKenney
Date: Tue Dec 17 2013 - 18:32:37 EST


On Tue, Dec 17, 2013 at 11:51:31PM +0100, Frederic Weisbecker wrote:
> Now that we have all the infrastructure in place and ready to support
> timekeeping duty balanced across every non full dynticks CPUs, we can
> hereby extend the timekeeping duty affinity.
>
> Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Cc: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
> Cc: John Stultz <john.stultz@xxxxxxxxxx>
> Cc: Alex Shi <alex.shi@xxxxxxxxxx>
> Cc: Kevin Hilman <khilman@xxxxxxxxxx>
> ---
> include/linux/tick.h | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/include/linux/tick.h b/include/linux/tick.h
> index bd3c32e..07c02e8 100644
> --- a/include/linux/tick.h
> +++ b/include/linux/tick.h
> @@ -203,15 +203,7 @@ static inline int tick_timekeeping_default_cpu(void)
> */
> static inline bool tick_timekeeping_cpu(int cpu)
> {
> - /*
> - * If there are full dynticks CPUs around,
> - * CPU 0 must stay periodic to update timekeeping.
> - */
> - if (tick_nohz_full_enabled())
> - return cpu == 0;
> -
> - /* Otherwise any CPU is elligible for timekeeping duty */
> - return true;
> + return !tick_nohz_full_cpu(cpu);

OK, I guess the future is already here. ;-)

Is it still OK for RCU to kick tick_do_timer_cpu? Or are there race
conditions that could result in the wrong CPU being kicked? Or is
there some guarantee that I missed that says that the timekeeping
CPU cannot change while in RCU_SYSIDLE_FULL_NOTED state?

Thanx, Paul

> }
>
> extern void tick_nohz_init(void);
> --
> 1.8.3.1
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/