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
Git-commit: cb22d91597
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
tirimbino
parent
4869fc02aa
commit
456f33d5cb
@ -1,14 +1,62 @@ |
||||
/* SPDX-License-Identifier: GPL-2.0 */ |
||||
/* Generated by Documentation/scheduler/sched-pelt; do not modify. */ |
||||
|
||||
|
||||
#ifdef CONFIG_PELT_UTIL_HALFLIFE_32 |
||||
static const u32 runnable_avg_yN_inv[] = { |
||||
0xffffffff, 0xfa83b2da, 0xf5257d14, 0xefe4b99a, 0xeac0c6e6, 0xe5b906e6, |
||||
0xe0ccdeeb, 0xdbfbb796, 0xd744fcc9, 0xd2a81d91, 0xce248c14, 0xc9b9bd85, |
||||
0xc5672a10, 0xc12c4cc9, 0xbd08a39e, 0xb8fbaf46, 0xb504f333, 0xb123f581, |
||||
0xad583ee9, 0xa9a15ab4, 0xa5fed6a9, 0xa2704302, 0x9ef5325f, 0x9b8d39b9, |
||||
0x9837f050, 0x94f4efa8, 0x91c3d373, 0x8ea4398a, 0x8b95c1e3, 0x88980e80, |
||||
0x85aac367, 0x82cd8698, |
||||
0xffffffff,0xfa83b2da,0xf5257d14,0xefe4b99a, |
||||
0xeac0c6e6,0xe5b906e6,0xe0ccdeeb,0xdbfbb796, |
||||
0xd744fcc9,0xd2a81d91,0xce248c14,0xc9b9bd85, |
||||
0xc5672a10,0xc12c4cc9,0xbd08a39e,0xb8fbaf46, |
||||
0xb504f333,0xb123f581,0xad583ee9,0xa9a15ab4, |
||||
0xa5fed6a9,0xa2704302,0x9ef5325f,0x9b8d39b9, |
||||
0x9837f050,0x94f4efa8,0x91c3d373,0x8ea4398a, |
||||
0x8b95c1e3,0x88980e80,0x85aac367,0x82cd8698, |
||||
}; |
||||
|
||||
static const u32 runnable_avg_yN_sum[] = { |
||||
0, 1002, 1982, 2941, 3880, 4798, 5697, 6576, 7437, 8279, 9103, |
||||
9909,10698,11470,12226,12966,13690,14398,15091,15769,16433,17082, |
||||
17718,18340,18949,19545,20128,20698,21256,21802,22336,22859,23371, |
||||
}; |
||||
|
||||
#define LOAD_AVG_PERIOD 32 |
||||
#define LOAD_AVG_MAX 47742 |
||||
#define LOAD_AVG_MAX_N 345 |
||||
|
||||
#endif |
||||
|
||||
#ifdef CONFIG_PELT_UTIL_HALFLIFE_16 |
||||
static const u32 runnable_avg_yN_inv[] = { |
||||
0xffffffff,0xf5257d14,0xeac0c6e6,0xe0ccdeeb, |
||||
0xd744fcc9,0xce248c14,0xc5672a10,0xbd08a39e, |
||||
0xb504f333,0xad583ee9,0xa5fed6a9,0x9ef5325f, |
||||
0x9837f050,0x91c3d373,0x8b95c1e3,0x85aac367, |
||||
}; |
||||
|
||||
static const u32 runnable_avg_yN_sum[] = { |
||||
0,22380,22411,22441,22470,22497,22523,22548,22572,22595,22617, |
||||
22638,22658,22677,22696,22714,22731, |
||||
}; |
||||
|
||||
#define LOAD_AVG_PERIOD 16 |
||||
#define LOAD_AVG_MAX 24152 |
||||
#define LOAD_AVG_MAX_N 517 |
||||
|
||||
#endif |
||||
|
||||
#ifdef CONFIG_PELT_UTIL_HALFLIFE_8 |
||||
static const u32 runnable_avg_yN_inv[] = { |
||||
0xffffffff,0xeac0c6e6,0xd744fcc9,0xc5672a10, |
||||
0xb504f333,0xa5fed6a9,0x9837f050,0x8b95c1e3, |
||||
}; |
||||
|
||||
static const u32 runnable_avg_yN_sum[] = { |
||||
0,20844,20053,19327,18661,18051,17491,16978,16507, |
||||
}; |
||||
|
||||
#define LOAD_AVG_PERIOD 8 |
||||
#define LOAD_AVG_MAX 12337 |
||||
#define LOAD_AVG_MAX_N 603 |
||||
|
||||
#endif |
||||
|
Loading…
Reference in new issue