All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/13] nohz: Use sysidle detection to let the timekeeper sleep
@ 2013-12-17 22:51 Frederic Weisbecker
  2013-12-17 22:51 ` [PATCH 01/13] tick: Rename tick_check_idle() to tick_irq_enter() Frederic Weisbecker
                   ` (13 more replies)
  0 siblings, 14 replies; 57+ messages in thread
From: Frederic Weisbecker @ 2013-12-17 22:51 UTC (permalink / raw)
  To: LKML
  Cc: Frederic Weisbecker, Alex Shi, Thomas Gleixner, Ingo Molnar,
	Peter Zijlstra, Steven Rostedt, Paul E. McKenney, John Stultz,
	Kevin Hilman

Hi,

This series makes the nohz subsystem eventually use the RCU full sysidle
detection.

When we have CPUs running in full dynticks mode in the system, the
CPU 0 handles the timekeeping duty on behalf of all other CPUs. Given
that full dynticks can run anytime, CPU 0 stays periodic and never
enter into dynticks idle mode. This is of course a powersaving issue.

Now making CPU 0 to become more power-friendly sounds like an easy task.
After all we just need to allow it to enter in dynticks idle mode as
soon as all full dynticks CPUs are idle (aka sysidle state, we'll
probably need some more precise name as it only applies to full dynticks
CPUs).

But sysidle state detection is actually difficult to get right. It
must scale with growing number of CPUs, minimize IPIs and atomic
operations on fast paths. Given that this detection already existed into
a bit more generalized form through the existing RCU extended quiescent
state detection, it has been implemented by specializing this code and
adding a state machine on top of it.
(Thanks to Paul for this work, more details: https://lwn.net/Articles/558284/)

This feature which is enabled with CONFIG_NO_HZ_FULL_SYSIDLE=y, is
working but is not yet plugged into the nohz subsystem. Namely we can
detect states where all full dynticks CPUs are sleeping, but we don't
yet take benefit from it by opportunistically stopping the tick of
the timekeeper CPU 0.

So this is what this series brings, more details following:

* Some code, naming and whitespace cleanups

* Allow all CPUs outside the nohz_full range to handle the timekeeping
  duty, not just CPU 0. Balancing the timekeeping duty should improve
  powersavings.

* Let the timekeeper (including CPU 0) sleep when its duty is
  handed over to another CPU

* Allow timekeeper to sleep when all full dynticks CPUs are sleeping
  (plug nohz to RCU sysidle detection)

* Wake up timekeeper with an IPI when full dynticks CPUs exit sysidle
  state

* Wake up CPU 0 when a secondary timekeeper is offlined so that its
  duty gets migrated


For convenience, you can fetch this from:

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
	timers/full_sysidle-rfc

Thanks,
	Frederic
---

Frederic Weisbecker (12):
      tick: Rename tick_check_idle() to tick_irq_enter()
      time: New helper to check CPU eligibility to handle timekeeping
      rcu: Exclude all potential timekeepers from sysidle detection
      tick: Use timekeeping_cpu() to elect the CPU handling timekeeping duty
      rcu: Fix unraised IPI to timekeeping CPU
      nohz: Introduce full dynticks' default timekeeping target
      sched: Enable IPI reception on timekeeper under nohz full system
      nohz: Get timekeeping max deferment outside jiffies_lock
      nohz: Allow timekeeper's tick to stop when all full dynticks CPUs are idle
      nohz: Hand over timekeeping duty on cpu offlining
      nohz: Wake up timekeeper on exit from sysidle state
      nohz: Allow all CPUs outside nohz_full range to do timekeeping

Alex Shi (1):
      nohz_full: fix code style issue of tick_nohz_full_stop_tick


 include/linux/tick.h      |  38 ++++++++++++--
 kernel/rcu/tree_plugin.h  |  12 ++---
 kernel/sched/core.c       |   6 +--
 kernel/softirq.c          |   2 +-
 kernel/time/tick-common.c |   2 +-
 kernel/time/tick-sched.c  | 128 +++++++++++++++++++++++++++++++++++-----------
 6 files changed, 142 insertions(+), 46 deletions(-)

^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2014-01-25 14:23 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-17 22:51 [RFC PATCH 00/13] nohz: Use sysidle detection to let the timekeeper sleep Frederic Weisbecker
2013-12-17 22:51 ` [PATCH 01/13] tick: Rename tick_check_idle() to tick_irq_enter() Frederic Weisbecker
2014-01-25 14:22   ` [tip:timers/urgent] " tip-bot for Frederic Weisbecker
2013-12-17 22:51 ` [PATCH 02/13] time: New helper to check CPU eligibility to handle timekeeping Frederic Weisbecker
2013-12-17 22:51 ` [PATCH 03/13] rcu: Exclude all potential timekeepers from sysidle detection Frederic Weisbecker
2013-12-17 23:27   ` Paul E. McKenney
2013-12-17 23:49     ` Frederic Weisbecker
2013-12-18 11:43       ` Peter Zijlstra
2013-12-18 11:46         ` Peter Zijlstra
2013-12-18 14:15         ` Paul E. McKenney
2013-12-18 16:24         ` Frederic Weisbecker
2013-12-17 22:51 ` [PATCH 04/13] tick: Use timekeeping_cpu() to elect the CPU handling timekeeping duty Frederic Weisbecker
2013-12-17 23:55   ` Paul E. McKenney
2013-12-17 22:51 ` [PATCH 05/13] rcu: Fix unraised IPI to timekeeping CPU Frederic Weisbecker
2013-12-17 23:21   ` Paul E. McKenney
2013-12-18 14:13     ` Frederic Weisbecker
2013-12-18 14:22       ` Paul E. McKenney
2013-12-18 14:56         ` Frederic Weisbecker
2013-12-18 15:11           ` Peter Zijlstra
2013-12-18 15:58             ` Frederic Weisbecker
2013-12-18 12:12   ` Peter Zijlstra
2013-12-18 15:38     ` Frederic Weisbecker
2013-12-18 15:45       ` Christoph Hellwig
2013-12-18 17:10       ` Peter Zijlstra
2013-12-17 22:51 ` [PATCH 06/13] nohz: Introduce full dynticks' default timekeeping target Frederic Weisbecker
2013-12-17 23:54   ` Paul E. McKenney
2013-12-17 22:51 ` [PATCH 07/13] sched: Enable IPI reception on timekeeper under nohz full system Frederic Weisbecker
2013-12-17 23:52   ` Paul E. McKenney
2013-12-18 14:49     ` Frederic Weisbecker
2013-12-18 15:50       ` Paul E. McKenney
2013-12-18 10:06   ` Peter Zijlstra
2013-12-17 22:51 ` [PATCH 08/13] nohz: Get timekeeping max deferment outside jiffies_lock Frederic Weisbecker
2014-01-25 14:22   ` [tip:timers/urgent] " tip-bot for Frederic Weisbecker
2013-12-17 22:51 ` [PATCH 09/13] nohz: Allow timekeeper's tick to stop when all full dynticks CPUs are idle Frederic Weisbecker
2013-12-17 23:51   ` Paul E. McKenney
2013-12-18 14:36     ` Frederic Weisbecker
2013-12-18 15:29       ` Paul E. McKenney
2013-12-17 22:51 ` [PATCH 10/13] nohz: Hand over timekeeping duty on cpu offlining Frederic Weisbecker
2013-12-17 23:40   ` Paul E. McKenney
2013-12-18 14:19     ` Frederic Weisbecker
2013-12-18 12:30   ` Peter Zijlstra
2013-12-18 16:43     ` Frederic Weisbecker
2013-12-17 22:51 ` [PATCH 11/13] nohz: Wake up timekeeper on exit from sysidle state Frederic Weisbecker
2013-12-17 23:34   ` Paul E. McKenney
2013-12-17 23:52     ` Frederic Weisbecker
2013-12-17 22:51 ` [PATCH 12/13] nohz: Allow all CPUs outside nohz_full range to do timekeeping Frederic Weisbecker
2013-12-17 23:32   ` Paul E. McKenney
2013-12-17 22:51 ` [PATCH 13/13] nohz_full: fix code style issue of tick_nohz_full_stop_tick Frederic Weisbecker
2013-12-18  2:04 ` [RFC PATCH 00/13] nohz: Use sysidle detection to let the timekeeper sleep Alex Shi
2013-12-18 10:19   ` Peter Zijlstra
2013-12-18 14:18     ` Paul E. McKenney
2013-12-18 17:43   ` Frederic Weisbecker
2013-12-18 21:29     ` Andy Lutomirski
2013-12-18 21:49       ` Paul E. McKenney
2013-12-18 21:53         ` Andy Lutomirski
2013-12-18 21:57           ` Paul E. McKenney
2013-12-18 22:55             ` Andy Lutomirski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.