aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorOlivier Cozette <olivier.cozette@arm.com>2012-10-17 14:30:30 +0100
committerViresh Kumar <viresh.kumar@linaro.org>2013-03-12 15:17:53 +0530
commit37380d0b7621d487b1d2885ad93227e880074ee5 (patch)
tree4c6755d21c635dade14828b452ac4ac1d862948c /arch
parent161bebe64ce4264105c09e022deeab0b94b06ead (diff)
ARM: Change load tracking scale using sysfs
These functions allow to change the load average period used in the task load average computation through /sys/kernel/hmp/load_avg_period_ms. This period is the time in ms to go from 0 to 0.5 load average while running or the time from 1 to 0.5 while sleeping. The default one used is 32 and gives the same load_avg_ratio computation than without this patch. These functions also allow to change the up and down threshold of HMP using /sys/kernel/hmp/{up,down}_threshold. Both must be between 0 and 1024. The thresholds are divided by 1024 before being compared to the load_avg_ratio. If /sys/kernel/hmp/load_avg_period_ms is 128 and /sys/kernel/hmp/up_threshold is 512, a task will be migrated to a bigger cluster after running for 128ms. Because after load_avg_period_ms the load average is 0.5 and real up_threshold us 512 / 1024 = 0.5. Signed-off-by: Olivier Cozette <olivier.cozette@arm.com> Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8ae87dc3806..42ea637002d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1629,6 +1629,29 @@ config HMP_SLOW_CPU_MASK
Specify the cpuids of the slow CPUs in the system as a list string,
e.g. cpuid 0+1 should be specified as 0-1.
+config HMP_VARIABLE_SCALE
+ bool "Allows changing the load tracking scale through sysfs"
+ depends on SCHED_HMP
+ help
+ When turned on, this option exports the thresholds and load average
+ period value for the load tracking patches through sysfs.
+ The values can be modified to change the rate of load accumulation
+ and the thresholds used for HMP migration.
+ The load_avg_period_ms is the time in ms to reach a load average of
+ 0.5 for an idle task of 0 load average ratio that start a busy loop.
+ The up_threshold and down_threshold is the value to go to a faster
+ CPU or to go back to a slower cpu.
+ The {up,down}_threshold are devided by 1024 before being compared
+ to the load average.
+ For examples, with load_avg_period_ms = 128 and up_threshold = 512,
+ a running task with a load of 0 will be migrated to a bigger CPU after
+ 128ms, because after 128ms its load_avg_ratio is 0.5 and the real
+ up_threshold is 0.5.
+ This patch has the same behavior as changing the Y of the load
+ average computation to
+ (1002/1024)^(LOAD_AVG_PERIOD/load_avg_period_ms)
+ but it remove intermadiate overflows in computation.
+
config HAVE_ARM_SCU
bool
help