All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v1 00/11] Create fast idle path for short idle periods
@ 2017-07-10  1:38 Aubrey Li
  2017-07-10  1:38 ` [RFC PATCH v1 01/11] sched/idle: create a fast " Aubrey Li
                   ` (11 more replies)
  0 siblings, 12 replies; 114+ messages in thread
From: Aubrey Li @ 2017-07-10  1:38 UTC (permalink / raw)
  To: tglx, peterz, len.brown, rjw, ak, tim.c.chen, arjan, paulmck,
	yang.zhang.wz
  Cc: x86, linux-kernel, Aubrey Li

From: Aubrey Li <aubrey.li@linux.intel.com>

Under some latency intensive workloads, short idle periods occurs very
common, so that idle entry and exit path starts to dominate. It's important
to optimize them for the short idle period pattern. A fast idle path proposal
is introduced here for this purpose.

This proposal uses two factors in idle menu governor to predict the next
idle period. The one is energy break even point, the other is repeatable
interval detector. These two factors are generic to all arches.

If the next idle period is longer than the predefined threshold, that means
the next idle will be a long idle, then the idle thread will enter the
original normal idle path. Otherwise, the coming idle will be a short idle,
the idle thread will enter the fast idle path, which is supposed to enter
and exit faster than the normal path.

The predicted idle period is already computed in the cpuidle framework, so
pass it directly to menu governor to select the next c-state. Menu governor
does not need to compute again.

We measured 3%~5% improvemnt in disk IO workload, and 8%~20% improvement in
network workload. 

Aubrey Li (11):
  sched/idle: create a fast path for short idle periods
  cpuidle: attach cpuidle governor statistics to the per-CPU device
  cpuidle: introduce cpuidle governor for idle prediction
  sched/idle: make the fast idle path for short idle periods
  cpuidle: update idle statistics before cpuidle governor
  timers: keep sleep length updated as needed
  cpuidle: make idle residency update more generic
  cpuidle: menu: remove reduplicative implementation
  cpuidle: menu: feed cpuidle prediction to menu governor
  cpuidle: update cpuidle governor when needed
  sched/idle: Add a tuning knob to allow changing fast idle threshold

 drivers/cpuidle/cpuidle.c        | 241 +++++++++++++++++++++++++++++++++++++++
 drivers/cpuidle/governors/menu.c | 192 +------------------------------
 include/linux/cpuidle.h          |  35 ++++++
 include/linux/sched/sysctl.h     |   1 +
 kernel/sched/idle.c              |  81 +++++++++++--
 kernel/sysctl.c                  |  10 ++
 kernel/time/tick-sched.c         |   3 +
 7 files changed, 366 insertions(+), 197 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-07-20 16:02 UTC | newest]

Thread overview: 114+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10  1:38 [RFC PATCH v1 00/11] Create fast idle path for short idle periods Aubrey Li
2017-07-10  1:38 ` [RFC PATCH v1 01/11] sched/idle: create a fast " Aubrey Li
2017-07-10  1:38 ` [RFC PATCH v1 02/11] cpuidle: attach cpuidle governor statistics to the per-CPU device Aubrey Li
2017-07-10  1:38 ` [RFC PATCH v1 03/11] cpuidle: introduce cpuidle governor for idle prediction Aubrey Li
2017-07-12 12:16   ` Peter Zijlstra
2017-07-10  1:38 ` [RFC PATCH v1 04/11] sched/idle: make the fast idle path for short idle periods Aubrey Li
2017-07-11 12:58   ` Paul E. McKenney
2017-07-11 16:33     ` Frederic Weisbecker
2017-07-11 18:11       ` Paul E. McKenney
2017-07-12  3:19         ` Li, Aubrey
2017-07-12  5:03           ` Paul E. McKenney
2017-07-12  5:22             ` Li, Aubrey
2017-07-12 12:19       ` Peter Zijlstra
2017-07-10  1:38 ` [RFC PATCH v1 05/11] cpuidle: update idle statistics before cpuidle governor Aubrey Li
2017-07-10  1:38 ` [RFC PATCH v1 06/11] timers: keep sleep length updated as needed Aubrey Li
2017-07-10  1:38 ` [RFC PATCH v1 07/11] cpuidle: make idle residency update more generic Aubrey Li
2017-07-10  1:38 ` [RFC PATCH v1 08/11] cpuidle: menu: remove reduplicative implementation Aubrey Li
2017-07-10  1:38 ` [RFC PATCH v1 09/11] cpuidle: menu: feed cpuidle prediction to menu governor Aubrey Li
2017-07-10  1:38 ` [RFC PATCH v1 10/11] cpuidle: update cpuidle governor when needed Aubrey Li
2017-07-10  1:38 ` [RFC PATCH v1 11/11] sched/idle: Add a tuning knob to allow changing fast idle threshold Aubrey Li
2017-07-10  8:46 ` [RFC PATCH v1 00/11] Create fast idle path for short idle periods Peter Zijlstra
2017-07-10  9:29   ` Wanpeng Li
2017-07-10 13:59   ` Li, Aubrey
2017-07-10 14:46   ` Andi Kleen
2017-07-10 16:42     ` Peter Zijlstra
2017-07-10 17:27       ` Andi Kleen
2017-07-11  4:40         ` Li, Aubrey
2017-07-11  9:41           ` Peter Zijlstra
2017-07-11 16:09             ` Frederic Weisbecker
2017-07-11 16:34               ` Peter Zijlstra
2017-07-11 18:09                 ` Paul E. McKenney
2017-07-12 11:54                   ` Peter Zijlstra
2017-07-12 15:56                     ` Paul E. McKenney
2017-07-12 17:46                       ` Peter Zijlstra
2017-07-12 18:53                         ` Paul E. McKenney
2017-07-12 19:00                           ` Paul E. McKenney
2017-07-19 13:43                       ` Frederic Weisbecker
2017-07-19 14:51                         ` Paul E. McKenney
2017-07-12 12:22                   ` Peter Zijlstra
2017-07-12 15:54                     ` Paul E. McKenney
2017-07-12 17:17                       ` Peter Zijlstra
2017-07-12 17:57                         ` Peter Zijlstra
2017-07-12 18:50                           ` Paul E. McKenney
2017-07-12 18:46                         ` Paul E. McKenney
2017-07-13  8:34                           ` Peter Zijlstra
2017-07-12  4:15                 ` Li, Aubrey
2017-07-12  8:34                   ` Peter Zijlstra
2017-07-12 21:32                     ` Andi Kleen
2017-07-13  8:36                       ` Peter Zijlstra
2017-07-13 14:48                         ` Li, Aubrey
2017-07-13 14:53                           ` Peter Zijlstra
2017-07-13 15:13                             ` Li, Aubrey
2017-07-13 18:28                               ` Peter Zijlstra
2017-07-14  3:56                                 ` Li, Aubrey
2017-07-14 15:38                                   ` Peter Zijlstra
2017-07-14 15:52                                     ` Arjan van de Ven
2017-07-14 15:58                                       ` Peter Zijlstra
2017-07-14 16:03                                         ` Andi Kleen
2017-07-17  9:21                                           ` Peter Zijlstra
2017-07-17 13:41                                             ` Li, Aubrey
2017-07-14 15:53                                     ` Andi Kleen
2017-07-14 16:06                                       ` Peter Zijlstra
2017-07-14 16:26                                         ` Andi Kleen
2017-07-17 19:23                                           ` Peter Zijlstra
2017-07-17 19:27                                             ` Arjan van de Ven
2017-07-17 19:46                                               ` Thomas Gleixner
2017-07-17 19:51                                                 ` Arjan van de Ven
2017-07-17 19:59                                                   ` Thomas Gleixner
2017-07-17 19:48                                             ` Arjan van de Ven
2017-07-17 19:53                                               ` Thomas Gleixner
2017-07-17 19:55                                                 ` Arjan van de Ven
2017-07-18  3:23                                               ` Li, Aubrey
2017-07-18 18:55                                               ` Peter Zijlstra
2017-07-18  3:14                                             ` Li, Aubrey
2017-07-18  4:45                                               ` Andi Kleen
2017-07-18  6:43                                                 ` Thomas Gleixner
2017-07-18  6:56                                                   ` Li, Aubrey
2017-07-18 15:20                                                     ` Paul E. McKenney
2017-07-18 15:29                                                       ` Arjan van de Ven
2017-07-18 16:36                                                         ` Peter Zijlstra
2017-07-18 16:37                                                           ` Arjan van de Ven
2017-07-18 17:05                                                             ` Peter Zijlstra
2017-07-19  5:44                                                       ` Li, Aubrey
2017-07-19 14:48                                                         ` Paul E. McKenney
2017-07-19 15:03                                                           ` Christopher Lameter
2017-07-19 16:54                                                             ` Paul E. McKenney
2017-07-20  1:40                                                           ` Li, Aubrey
2017-07-20 12:50                                                             ` Paul E. McKenney
2017-07-20 13:45                                                               ` Arjan van de Ven
2017-07-20 14:19                                                               ` Peter Zijlstra
2017-07-20 16:02                                                                 ` Paul E. McKenney
2017-07-18 16:45                                                     ` Peter Zijlstra
2017-07-18  6:59                                                   ` Andi Kleen
2017-07-18  7:19                                                     ` Thomas Gleixner
2017-07-19  6:12                                                       ` Li, Aubrey
2017-07-19  7:55                                                         ` Thomas Gleixner
2017-07-20  1:56                                                           ` Li, Aubrey
2017-07-20  8:11                                                             ` Thomas Gleixner
2017-07-20 13:48                                                               ` Arjan van de Ven
2017-07-18  7:24                                                     ` Thomas Gleixner
2017-07-18 13:23                                               ` Peter Zijlstra
2017-07-19 13:43                                               ` Peter Zijlstra
2017-07-13 15:20                             ` Paul E. McKenney
2017-07-14  3:47                               ` Li, Aubrey
2017-07-14  4:05                                 ` Paul E. McKenney
2017-07-17 13:24                                   ` Li, Aubrey
2017-07-17 13:58                                     ` Peter Zijlstra
2017-07-17 14:02                                       ` Li, Aubrey
2017-07-12 12:14                   ` Peter Zijlstra
2017-07-11 17:58               ` Christoph Lameter
2017-07-12  2:07                 ` Li, Aubrey
2017-07-12  2:35               ` Li, Aubrey
2017-07-12 18:10               ` Peter Zijlstra
2017-07-11  9:02         ` Peter Zijlstra

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.