Add extra two performance optimization methods by setting sysfs nodes:
- Method 1: set sched_migration_cost_ns to 0:
By default sched_migration_cost_ns = 50000, scheduler calls can_migrate_task() to check if tasks are cache hot or not and it compares sched_migration_cost_ns to avoid migrate tasks frequently.
This introduces side effects to easily pack tasks on the same one CPU and introduce latency to spread tasks within multi-cores, especially if we think energy aware scheduling is easily to pack tasks on single CPU. So after task packing on one CPU with high utilization, we can easily spread out tasks after we set sched_migration_cost_ns to 0.
- Method 2: set busy_factor to 1:
This decreases load balance inteval time, so it will give more chance for active load balance for migration running task from little core to big core.
Method 1 can improve prominent performance on one big.LITTLE system (which has CA53x4 + CA72x4 cores), from the Geekbench testing result the score can improve performance ~5%.
Tested method 1 with Geekbench on the ARM Juno R2 board for multi-thread case, the score can be improved from 2348 to 2368, so can improve performance ~0.84%.
Tested method 2 on Juno as well, but it has very minor performance boosting.
Signed-off-by: Leo Yan leo.yan@linaro.org --- Documentation/scheduler/sched-energy.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/Documentation/scheduler/sched-energy.txt b/Documentation/scheduler/sched-energy.txt index dab2f90..c0e62fe 100644 --- a/Documentation/scheduler/sched-energy.txt +++ b/Documentation/scheduler/sched-energy.txt @@ -360,3 +360,27 @@ of the cpu from idle/busy power of the shared resources. The cpu can be tricked into different per-cpu idle states by disabling the other states. Based on various combinations of measurements with specific cpus busy and disabling idle-states it is possible to extrapolate the idle-state power. + +Performance tunning method +========================== + +Below setting may impact heavily for performance tunning: + +echo 0 > /proc/sys/kernel/sched_migration_cost_ns + +After set sched_migration_cost_ns to 0, it is helpful to spread tasks within +the big cluster. Otherwise when scheduler executes load balance, it calls +can_migrate_task() to check if tasks are cache hot or not and it compares +sched_migration_cost_ns to avoid migrate tasks frequently. This introduce side +effect to easily pack tasks on the same one CPU and introduce latency to +spread tasks within multi-cores, especially if we think about energy awared +scheduling to pack tasks on single CPU. + +echo 1 > /proc/sys/kernel/sched_domain/cpuX/domain0/busy_factor +echo 1 > /proc/sys/kernel/sched_domain/cpuX/domain1/busy_factor + +After set busy_factor to 1, it decreases load balance inteval time. So if we +take min_interval = 8, that means we permit the load balance interval = +busy_factor * min_interval = 8ms. So this will shorten task migration latency, +especially if we want to migrate a running task from little core to big core +to trigger active load balance. -- 1.9.1