diff options
| author | Pavankumar Kondeti <pkondeti@codeaurora.org> | 2015-06-08 09:08:47 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:25:17 -0700 |
| commit | 6d742ce87b0337f422edf9c114357758e6feb01f (patch) | |
| tree | 6169cd473bc056ec6b8bfa60972f1ddb25ba4260 /kernel/sched/idle_task.c | |
| parent | efa673322fd6917acb69361fc01f746a13b3fcde (diff) | |
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.]
Diffstat (limited to 'kernel/sched/idle_task.c')
| -rw-r--r-- | kernel/sched/idle_task.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/idle_task.c b/kernel/sched/idle_task.c index b46a0f9082d4..36c6634236fb 100644 --- a/kernel/sched/idle_task.c +++ b/kernel/sched/idle_task.c @@ -93,7 +93,7 @@ dec_hmp_sched_stats_idle(struct rq *rq, struct task_struct *p) static void fixup_hmp_sched_stats_idle(struct rq *rq, struct task_struct *p, - u32 new_task_load) + u32 new_task_load, u32 new_pred_demand) { } |
