summaryrefslogtreecommitdiff
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@codeaurora.org>2014-09-01 13:26:53 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:00:50 -0700
commit3a67b4ce87bf96312d4c5728047d830a66258854 (patch)
treebd392503fe5c0f2da5231f1865cc86fd8b7b0672 /kernel/sysctl.c
parent977dc392f77522559697cbedfb2d48ad7be96aec (diff)
sched: window-stats: Enhance cpu busy time accounting
rq->curr/prev_runnable_sum counters represent cpu demand from various tasks that have run on a cpu. Any task that runs on a cpu will have a representation in rq->curr_runnable_sum. Their partial_demand value will be included in rq->curr_runnable_sum. Since partial_demand is derived from historical load samples for a task, rq->curr_runnable_sum could represent "inflated/un-realistic" cpu usage. As an example, lets say that task with partial_demand of 10ms runs for only 1ms on a cpu. What is included in rq->curr_runnable_sum is 10ms (and not the actual execution time of 1ms). This leads to cpu busy time being reported on the upside causing frequency to stay higher than necessary. This patch fixes cpu busy accounting scheme to strictly represent actual usage. It also provides for conditional fixup of busy time upon migration and upon heavy-task wakeup. CRs-Fixed: 691443 Change-Id: Ic4092627668053934049af4dfef65d9b6b901e6b Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org> Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org> [joonwoop@codeaurora.org: fixed conflict in init_task_load(), se.avg.decay_count has deprecated.] Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c52
1 files changed, 32 insertions, 20 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 7d54b6b1bfed..700686eb6323 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -292,6 +292,13 @@ static struct ctl_table kern_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
+ {
+ .procname = "sched_wakeup_load_threshold",
+ .data = &sysctl_sched_wakeup_load_threshold,
+ .maxlen = sizeof(unsigned int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
+ },
#ifdef CONFIG_SCHED_FREQ_INPUT
{
.procname = "sched_freq_inc_notify_slack_pct",
@@ -307,16 +314,37 @@ static struct ctl_table kern_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
-#endif
-#if defined(CONFIG_SCHED_FREQ_INPUT) || defined(CONFIG_SCHED_HMP)
{
- .procname = "sched_freq_legacy_mode",
- .data = &sysctl_sched_freq_legacy_mode,
+ .procname = "sched_migration_fixup",
+ .data = &sysctl_sched_migration_fixup,
.maxlen = sizeof(unsigned int),
.mode = 0644,
.proc_handler = sched_window_update_handler,
},
{
+ .procname = "sched_freq_account_wait_time",
+ .data = &sysctl_sched_freq_account_wait_time,
+ .maxlen = sizeof(unsigned int),
+ .mode = 0644,
+ .proc_handler = sched_window_update_handler,
+ },
+ {
+ .procname = "sched_heavy_task",
+ .data = &sysctl_sched_heavy_task_pct,
+ .maxlen = sizeof(unsigned int),
+ .mode = 0644,
+ .proc_handler = sched_hmp_proc_update_handler,
+ },
+ {
+ .procname = "sched_gov_response_time",
+ .data = &sysctl_sched_gov_response_time,
+ .maxlen = sizeof(unsigned int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
+ },
+#endif
+#ifdef CONFIG_SCHED_HMP
+ {
.procname = "sched_account_wait_time",
.data = &sysctl_sched_account_wait_time,
.maxlen = sizeof(unsigned int),
@@ -338,22 +366,6 @@ static struct ctl_table kern_table[] = {
.proc_handler = sched_window_update_handler,
},
{
- .procname = "sched_gov_response_time",
- .data = &sysctl_sched_gov_response_time,
- .maxlen = sizeof(unsigned int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
- {
- .procname = "sched_wakeup_load_threshold",
- .data = &sysctl_sched_wakeup_load_threshold,
- .maxlen = sizeof(unsigned int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
-#endif
-#ifdef CONFIG_SCHED_HMP
- {
.procname = "sched_small_task",
.data = &sysctl_sched_small_task_pct,
.maxlen = sizeof(unsigned int),