summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorPatrick Bellasi <patrick.bellasi@arm.com>2017-11-21 16:31:58 +0000
committerPatrick Bellasi <patrick.bellasi@arm.com>2018-07-18 11:28:58 +0100
commitcb22d9159761cb32c35a5f9399b8011fcdae654b (patch)
tree1c1814dda29e9794ab52e106928ef49c262b4058 /init
parent7fc13166181e8b70832b0491922c9c8c763d680f (diff)
FROMLIST: sched/fair: add support to tune PELT ramp/decay timings
The PELT half-life is the time [ms] required by the PELT signal to build up a 50% load/utilization, starting from zero. This time is currently hardcoded to be 32ms, a value which seems to make sense for most of the workloads. However, 32ms has been verified to be too long for certain classes of workloads. For example, in the mobile space many tasks affecting the user-experience run with a 16ms or 8ms cadence, since they need to match the common 60Hz or 120Hz refresh rate of the graphics pipeline. This contributed so fare to the idea that "PELT is too slow" to properly track the utilization of interactive mobile workloads, especially compared to alternative load tracking solutions which provides a better representation of tasks demand in the range of 10-20ms. A faster PELT ramp-up time could give some advantages to speed-up the time required for the signal to stabilize and thus to better represent task demands in the mobile space. As a downside, it also reduces the decay time, and thus we forget the load/utilization of sleeping tasks (or idle CPUs) faster. Fortunately, since the integration of the utilization estimation support in mainline kernel: commit 7f65ea42eb00 ("sched/fair: Add util_est on top of PELT") a fast decay time is no longer an issue for tasks utilization estimation. Although estimated utilization does not slow down the decay of blocked utilization on idle CPUs, for mobile workloads this seems not to be a major concern compared to the benefits in interactivity responsiveness. Let's add a compile time option to choose the PELT speed which better fits for a specific system. By default the current 32ms half-life is used, but we can also compile a kernel to use a faster ramp-up time of either 16ms or 8ms. These two configurations have been verified to give PELT a further improvement in performance, compared to other out-of-tree load tracking solutions, when it comes to track interactive workloads thus better supporting both tasks placements and frequencies selections. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Paul Turner <pjt@google.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Cc: Joel Fernandes <joelaf@google.com> Cc: Morten Rasmussen <morten.rasmussen@arm.com> Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org [ backport from LKML: Message-ID: <20180409165134.707-1-patrick.bellasi@arm.com> ] Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> Change-Id: I50569748918b799ac4bf4e7d2b387253080a0fd2
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig35
1 files changed, 35 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 0d0798a6706d..37ecab2cba99 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -595,6 +595,41 @@ config HAVE_UNSTABLE_SCHED_CLOCK
config GENERIC_SCHED_CLOCK
bool
+menu "FAIR Scheuler tunables"
+
+choice
+ prompt "Utilization's PELT half-Life"
+ default PELT_UTIL_HALFLIFE_32
+ help
+ Allows choosing one of the possible values for the PELT half-life to
+ be used for the update of the utilization of tasks and CPUs.
+ The half-life is the amount of [ms] required by the PELT signal to
+ build up to 50% utilization. The higher the half-life the longer it
+ takes for a task to be represented as a big one.
+
+ If not sure, use the default of 32 ms.
+
+config PELT_UTIL_HALFLIFE_32
+ bool "32 ms, default for server"
+
+config PELT_UTIL_HALFLIFE_16
+ bool "16 ms, suggested for interactive workloads"
+ help
+ Use 16ms as PELT half-life value. This will increase the ramp-up and
+ decay of utlization and load twice as fast as for the default
+ configuration using 32ms.
+
+config PELT_UTIL_HALFLIFE_8
+ bool "8 ms, very fast"
+ help
+ Use 8ms as PELT half-life value. This will increase the ramp-up and
+ decay of utlization and load four time as fast as for the default
+ configuration using 32ms.
+
+endchoice
+
+endmenu # FAIR Scheduler tunables"
+
#
# For architectures that want to enable the support for NUMA-affine scheduler
# balancing logic: