android_kernel_oneplus_msm8998/kernel/sched
Pavankumar Kondeti 6d742ce87b sched: Add separate load tracking histogram to predict loads
Current window based load tracking only saves history for five
windows. A historically heavy task's heavy load will be completely
forgotten after five windows of light load. Even before the five
window expires, a heavy task wakes up on same CPU it used to run won't
trigger any frequency change until end of the window. It would starve
for the entire window. It also adds one "small" load window to
history because it's accumulating load at a low frequency, further
reducing the tracked load for this heavy task.

Ideally, scheduler should be able to identify such tasks and notify
governor to increase frequency immediately after it wakes up.

Add a histogram for each task to track a much longer load history. A
prediction will be made based on runtime of previous or current
window, histogram data and load tracked in recent windows. Prediction
of all tasks that is currently running or runnable on a CPU is
aggregated and reported to CPUFreq governor in sched_get_cpus_busy().

sched_get_cpus_busy() now returns predicted busy time in addition
to previous window busy time and new task busy time, scaled to
the CPU maximum possible frequency.

Tunables:

- /proc/sys/kernel/sched_gov_alert_freq (KHz)

This tunable can be used to further filter the notifications.
Frequency alert notification is sent only when the predicted
load exceeds previous window load by sched_gov_alert_freq converted to
load.

Change-Id: If29098cd2c5499163ceaff18668639db76ee8504
Suggested-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
[joonwoop@codeaurora.org: fixed merge conflicts around __migrate_task()
 and removed changes for CONFIG_SCHED_QHMP.]
2016-03-23 21:25:17 -07:00
..
auto_group.c
auto_group.h
clock.c treewide: Remove old email address 2015-11-23 09:44:58 +01:00
completion.c
core.c sched: Add separate load tracking histogram to predict loads 2016-03-23 21:25:17 -07:00
cpuacct.c
cpuacct.h
cpudeadline.c
cpudeadline.h
cpupri.c
cpupri.h
cputime.c sched/cputime: fix a deadlock on 32bit systems 2016-03-23 20:02:39 -07:00
deadline.c sched: Add separate load tracking histogram to predict loads 2016-03-23 21:25:17 -07:00
debug.c sched: Introduce the concept CPU clusters in the scheduler 2016-03-23 21:25:10 -07:00
fair.c sched: Add separate load tracking histogram to predict loads 2016-03-23 21:25:17 -07:00
features.h sched: Rework energy aware scheduling 2016-03-23 20:02:18 -07:00
idle.c vmstat: make vmstat_updater deferrable again and shut down on idle 2016-03-23 21:22:14 -07:00
idle_task.c sched: Add separate load tracking histogram to predict loads 2016-03-23 21:25:17 -07:00
loadavg.c
Makefile sched_avg: add run queue averaging 2016-03-23 20:01:32 -07:00
rt.c sched: Add separate load tracking histogram to predict loads 2016-03-23 21:25:17 -07:00
sched.h sched: Add separate load tracking histogram to predict loads 2016-03-23 21:25:17 -07:00
sched_avg.c sched: Keep track of average nr_big_tasks 2016-03-23 20:01:42 -07:00
stats.c
stats.h
stop_task.c sched: Add separate load tracking histogram to predict loads 2016-03-23 21:25:17 -07:00
wait.c sched/wait: Fix the signal handling fix 2015-12-13 14:30:59 -08:00