linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: srinivas.pandruvada@linux.intel.com, tglx@linutronix.de,
	mingo@redhat.com, peterz@infradead.org, bp@suse.de,
	lenb@kernel.org, rjw@rjwysocki.net, mgorman@techsingularity.net
Cc: x86@kernel.org, linux-pm@vger.kernel.org,
	viresh.kumar@linaro.org, juri.lelli@arm.com,
	linux-kernel@vger.kernel.org
Subject: [RFC/RFT] [PATCH 00/10] Intel_pstate: HWP Dynamic performance boost
Date: Tue, 15 May 2018 21:49:01 -0700	[thread overview]
Message-ID: <20180516044911.28797-1-srinivas.pandruvada@linux.intel.com> (raw)

This series tries to address some concern in performance particularly with IO
workloads (Reported by Mel Gorman), when HWP is using intel_pstate powersave
policy.

Background
HWP performance can be controlled by user space using sysfs interface for
max/min frequency limits and energy performance preference settings. Based on
workload characteristics these can be adjusted from user space. These limits
are not changed dynamically by kernel based on workload.

By default HWP defaults to energy performance preference value of 0x80 on
majority of platforms(Scale is 0-255, 0 is max performance and 255 is min).
This value offers best performance/watt and for majority of server workloads
performance doesn't suffer. Also users always have option to use performance
policy of intel_pstate, to get best performance. But user tend to run with
out of box configuration, which is powersave policy on most of the distros.

In some case it is possible to dynamically adjust performance, for example,
when a CPU is woken up due to IO completion or thread migrate to a new CPU. In
this case HWP algorithm will take some time to build utilization and ramp up
P-states. So this may results in lower performance for some IO workloads and
workloads which tend to migrate. The idea of this patch series is to
temporarily boost performance dynamically in these cases. This is only
applicable only when user is using powersave policy, not in performance policy.

Results on a Skylake server:

Benchmark                       Improvement %
----------------------------------------------------------------------
dbench                          50.36
thread IO bench (tiobench)      10.35
File IO                         9.81
sqlite                          15.76
X264 -104 cores                 9.75

Spec Power                      (Negligible impact 7382 Vs. 7378)
Idle Power                      No change observed
-----------------------------------------------------------------------

HWP brings in best performace/watt at EPP=0x80. Since we are boosting
EPP here to 0, the performance/watt drops upto 10%. So there is a power
penalty of these changes.

Also Mel Gorman provided test results on a prior patchset, which shows
benifits of this series.

Peter Zijlstra (1):
  x86,sched: Add support for frequency invariance

Srinivas Pandruvada (9):
  cpufreq: intel_pstate: Conditional frequency invariant accounting
  cpufreq: intel_pstate: Utility functions to boost HWP performance
    limits
  cpufreq: intel_pstate: Add update_util_hook for HWP
  cpufreq: intel_pstate: HWP boost performance on IO Wake
  cpufreq / sched: Add interface to get utilization values
  cpufreq: intel_pstate: HWP boost performance on busy task migrate
  cpufreq: intel_pstate: Dyanmically update busy pct
  cpufreq: intel_pstate: New sysfs entry to control HWP boost
  cpufreq: intel_pstate: enable boost for SKX

 arch/x86/include/asm/topology.h |  29 +++++
 arch/x86/kernel/smpboot.c       | 196 +++++++++++++++++++++++++++++-
 drivers/cpufreq/intel_pstate.c  | 260 +++++++++++++++++++++++++++++++++++++++-
 include/linux/sched/cpufreq.h   |   2 +
 kernel/sched/core.c             |   1 +
 kernel/sched/cpufreq.c          |  23 ++++
 kernel/sched/sched.h            |   7 ++
 7 files changed, 513 insertions(+), 5 deletions(-)

-- 
2.9.5

             reply	other threads:[~2018-05-16  4:49 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16  4:49 Srinivas Pandruvada [this message]
2018-05-16  4:49 ` [RFC/RFT] [PATCH 01/10] x86,sched: Add support for frequency invariance Srinivas Pandruvada
2018-05-16  9:56   ` Peter Zijlstra
2018-05-16  4:49 ` [RFC/RFT] [PATCH 02/10] cpufreq: intel_pstate: Conditional frequency invariant accounting Srinivas Pandruvada
2018-05-16  7:16   ` Peter Zijlstra
2018-05-16  7:29     ` Peter Zijlstra
2018-05-16  9:07       ` Rafael J. Wysocki
2018-05-16 17:32         ` Srinivas Pandruvada
2018-05-16 15:19   ` Juri Lelli
2018-05-16 15:47     ` Peter Zijlstra
2018-05-16 16:31       ` Juri Lelli
2018-05-17 10:59         ` Juri Lelli
2018-05-17 15:04           ` Juri Lelli
2018-05-17 15:41             ` Srinivas Pandruvada
2018-05-17 16:16               ` Peter Zijlstra
2018-05-17 16:42                 ` Srinivas Pandruvada
2018-05-17 16:56                   ` Rafael J. Wysocki
2018-05-17 18:28                     ` Peter Zijlstra
2018-05-18  7:36                       ` Rafael J. Wysocki
2018-05-18 10:57                       ` Patrick Bellasi
2018-05-18 11:29                         ` Peter Zijlstra
2018-05-18 13:33                           ` Patrick Bellasi
2018-05-30 16:57                             ` Patrick Bellasi
2018-05-18 14:09                           ` Valentin Schneider
2018-05-16 15:58     ` Srinivas Pandruvada
2018-05-16  4:49 ` [RFC/RFT] [PATCH 03/10] cpufreq: intel_pstate: Utility functions to boost HWP performance limits Srinivas Pandruvada
2018-05-16  7:22   ` Peter Zijlstra
2018-05-16  9:15     ` Rafael J. Wysocki
2018-05-16 10:43       ` Peter Zijlstra
2018-05-16 15:39         ` Srinivas Pandruvada
2018-05-16 15:41     ` Srinivas Pandruvada
2018-05-16  4:49 ` [RFC/RFT] [PATCH 04/10] cpufreq: intel_pstate: Add update_util_hook for HWP Srinivas Pandruvada
2018-05-16  4:49 ` [RFC/RFT] [PATCH 05/10] cpufreq: intel_pstate: HWP boost performance on IO Wake Srinivas Pandruvada
2018-05-16  7:37   ` Peter Zijlstra
2018-05-16 17:55     ` Srinivas Pandruvada
2018-05-17  8:19       ` Peter Zijlstra
2018-05-16  9:45   ` Rafael J. Wysocki
2018-05-16 19:28     ` Srinivas Pandruvada
2018-05-16  4:49 ` [RFC/RFT] [PATCH 06/10] cpufreq / sched: Add interface to get utilization values Srinivas Pandruvada
2018-05-16  6:40   ` Viresh Kumar
2018-05-16 22:25     ` Srinivas Pandruvada
2018-05-16  8:11   ` Peter Zijlstra
2018-05-16 22:40     ` Srinivas Pandruvada
2018-05-17  7:50       ` Peter Zijlstra
2018-05-16  4:49 ` [RFC/RFT] [PATCH 07/10] cpufreq: intel_pstate: HWP boost performance on busy task migrate Srinivas Pandruvada
2018-05-16  9:49   ` Rafael J. Wysocki
2018-05-16 20:59     ` Srinivas Pandruvada
2018-05-16  4:49 ` [RFC/RFT] [PATCH 08/10] cpufreq: intel_pstate: Dyanmically update busy pct Srinivas Pandruvada
2018-05-16  7:43   ` Peter Zijlstra
2018-05-16  7:47   ` Peter Zijlstra
2018-05-16  4:49 ` [RFC/RFT] [PATCH 09/10] cpufreq: intel_pstate: New sysfs entry to control HWP boost Srinivas Pandruvada
2018-05-16  4:49 ` [RFC/RFT] [PATCH 10/10] cpufreq: intel_pstate: enable boost for SKX Srinivas Pandruvada
2018-05-16  7:49   ` Peter Zijlstra
2018-05-16 15:46     ` Srinivas Pandruvada
2018-05-16 15:54       ` Peter Zijlstra
2018-05-17  0:52         ` Srinivas Pandruvada
2018-05-16  6:49 ` [RFC/RFT] [PATCH 00/10] Intel_pstate: HWP Dynamic performance boost Juri Lelli
2018-05-16 15:43   ` Srinivas Pandruvada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180516044911.28797-1-srinivas.pandruvada@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=bp@suse.de \
    --cc=juri.lelli@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=viresh.kumar@linaro.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).