All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] CFS idle injection
@ 2015-11-13 19:53 Jacob Pan
  2015-11-13 19:53 ` [PATCH 1/4] ktime: add a roundup function Jacob Pan
                   ` (3 more replies)
  0 siblings, 4 replies; 78+ messages in thread
From: Jacob Pan @ 2015-11-13 19:53 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, John Stultz, LKML
  Cc: Arjan van de Ven, Srinivas Pandruvada, Len Brown, Rafael Wysocki,
	Eduardo Valentin, Paul Turner, Jacob Pan

We are entering a very power and thermal constrained environment. Often
we have more horsepower than we can use due to these limits. But
on the other side we all demand performance when needed. The reserved
performance headroom does not come free. To conserve energy, more and
more SoC blocks can be power gated at runtime. However, randomly
scheduled idle time on individual CPU may not result in good power
saving in that the common circuits such as memory controller can only be
in the low power state when all cores are in idle at the same time.

Frequency-Voltage scaling presents a good solution but its efficiency
is limited to certain range.

In general, only synchronized idle will allow SoC to enter the
deepest power states. For most modern processors, deep idle power is
nearly negligible to the peak running power. This implies if we can
duty cycle the CPU between running and the deepest idle state, we can
scale performance and power almost linearly. Combined with the most
efficient frequency point, idle injection presents a way to cap power
efficiently.

Intel powerclamp driver was introduced a while ago to address the
problem but is broken in the sense of turning off idle ticks in the
forced idle period. https://lkml.org/lkml/2014/12/18/369

It was suggested to replace the current kthread play idle loop with a
timer based runqueue throttling scheme. I finally got around to
implement this and code looks much simpler and more effective.

Test results were presented at LinuxCon where data/graph can be seen
from slides #18 and later.
http://events.linuxfoundation.org/sites/events/files/slides/LinuxCon_Japan_2015_idle_injection1_0.pdf

RFC discussions are here.
https://lkml.org/lkml/2015/11/2/756

Thanks,

Jacob



Jacob Pan (4):
  ktime: add a roundup function
  timer: relax tick stop in idle entry
  sched: introduce synchronized idle injection
  sched: add trace event for idle injection

 include/linux/ktime.h        |  10 ++
 include/linux/sched.h        |  16 ++
 include/linux/sched/sysctl.h |   5 +
 include/trace/events/sched.h |  25 +++
 init/Kconfig                 |  10 ++
 kernel/sched/fair.c          | 356 ++++++++++++++++++++++++++++++++++++++++++-
 kernel/sched/sched.h         |  54 ++++++-
 kernel/sysctl.c              |  21 +++
 kernel/time/tick-sched.c     |   2 +-
 9 files changed, 493 insertions(+), 6 deletions(-)

-- 
1.9.1


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

end of thread, other threads:[~2016-01-19 18:01 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-13 19:53 [PATCH 0/4] CFS idle injection Jacob Pan
2015-11-13 19:53 ` [PATCH 1/4] ktime: add a roundup function Jacob Pan
2015-11-13 20:11   ` John Stultz
2015-11-13 22:33     ` Jacob Pan
2015-11-13 20:13   ` Thomas Gleixner
2015-11-13 22:36     ` Jacob Pan
2015-11-13 19:53 ` [PATCH 2/4] timer: relax tick stop in idle entry Jacob Pan
2015-11-13 20:22   ` Thomas Gleixner
2015-11-13 22:24     ` Jacob Pan
2015-11-16 15:06       ` Thomas Gleixner
2015-11-16 21:51         ` Jacob Pan
2015-11-16 22:01           ` Thomas Gleixner
2015-11-17  0:09             ` Jacob Pan
2015-11-19 17:43               ` Jacob Pan
2015-11-19 19:06               ` Peter Zijlstra
2015-11-19 19:21                 ` Jacob Pan
2015-11-19 19:59                   ` Peter Zijlstra
2015-11-19 23:41                     ` Jacob Pan
2015-11-16 22:31           ` Paul E. McKenney
2015-11-16 23:05             ` Jacob Pan
2015-11-16 23:15             ` Jacob Pan
2015-11-16 23:28               ` Paul E. McKenney
2015-11-16 23:32                 ` Arjan van de Ven
2015-11-16 23:40                   ` Jacob Pan
2015-11-17  0:00                     ` Paul E. McKenney
2015-11-16 22:32           ` Josh Triplett
2015-11-16 23:26             ` Paul E. McKenney
2015-11-17  1:41               ` Josh Triplett
2015-11-17  2:53                 ` Paul E. McKenney
2015-11-17  2:57                   ` Arjan van de Ven
2015-11-17  5:04                     ` Paul E. McKenney
2015-11-17 10:24                       ` Peter Zijlstra
2015-11-17 12:57                         ` Jacob Pan
2015-11-17 13:49                           ` Paul E. McKenney
2015-11-13 19:53 ` [PATCH 3/4] sched: introduce synchronized idle injection Jacob Pan
2015-11-13 20:23   ` kbuild test robot
2015-11-18  8:36   ` Ingo Molnar
2015-11-18 10:35     ` Peter Zijlstra
2015-11-18 12:27       ` Morten Rasmussen
2015-11-18 12:49         ` Peter Zijlstra
2015-11-18 14:04           ` Morten Rasmussen
2015-11-18 14:52             ` Jacob Pan
2015-11-18 15:09               ` Morten Rasmussen
2015-11-18 15:11                 ` Jacob Pan
2015-11-18 15:21                   ` Thomas Gleixner
2015-11-18 17:03                     ` Jacob Pan
2015-11-18 16:04                   ` Morten Rasmussen
2015-11-27  9:17       ` Ingo Molnar
2015-11-18 14:10     ` Jacob Pan
2015-11-27  9:17       ` Ingo Molnar
2015-12-02 17:28         ` Jacob Pan
2015-11-18 14:19     ` Arjan van de Ven
2015-11-18 15:44   ` Morten Rasmussen
2015-11-18 15:51     ` Arjan van de Ven
2015-11-19 17:24       ` Morten Rasmussen
2015-11-19 20:09         ` Peter Zijlstra
2015-11-20  9:45           ` Thomas Gleixner
2015-11-20 10:20             ` Peter Zijlstra
2015-11-20 10:58               ` Thomas Gleixner
2015-11-20 12:54                 ` Peter Zijlstra
2015-11-20 18:53                   ` Thomas Gleixner
2016-01-11 21:50                     ` Jacob Pan
2016-01-19 12:06                       ` Ingo Molnar
2016-01-19 18:00                         ` Jacob Pan
2015-11-24 11:38                 ` Jacob Pan
2015-11-23 17:59         ` Jacob Pan
2015-11-23 17:56   ` Javi Merino
2015-11-23 18:07     ` Peter Zijlstra
2015-11-24  9:12       ` Javi Merino
2015-11-24 10:09         ` Peter Zijlstra
2015-11-24 11:10           ` Jacob Pan
2015-11-24 12:00             ` Javi Merino
2015-11-24 18:22               ` Jacob Pan
2015-11-25  9:41                 ` Javi Merino
2015-11-13 19:53 ` [PATCH 4/4] sched: add trace event for " Jacob Pan
2015-11-13 20:10   ` kbuild test robot
2015-11-19 14:39   ` Javi Merino
2015-11-19 15:35     ` Jacob Pan

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.