summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@codeaurora.org>2014-04-29 12:44:43 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 19:59:16 -0700
commit33e71001037326b76c5fc0764167afd6f03285d5 (patch)
tree82d4b15172a903b00848239cc193fcdb2c6847a4 /include/linux
parent490b1d23cc0c905b1cfb722ece7291a6d3a0f87e (diff)
sched: window-stats: synchronize windows across cpus
Synchronizing windows across cpus for task load measurements simplifies cpu busy time accounting during migrations. For task migrations, its usage in current window can be carried over to its new cpu. This lets cpufreq governor see a correct picture of cpu busy time that is not affected by migrations. This patch lines up windows across cpus. One of the cpu, sync_cpu, serves as a reference for all others. During bootup sync_cpu would initialize its window_start (from its sched_clock()). Other cpus will synchronize their window_start in reference to sync_cpu. This patch assumes synchronous sched_clock() across cpus and may need some change to address architectures which do not provide such synchronized sched_clock(). Change-Id: I13381389a72f5f9f85cc2446401d493a55c78ab7 Signed-off-by: Steve Muckle <smuckle@codeaurora.org> Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5cdba398f367..74977547700f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1249,8 +1249,6 @@ struct sched_statistics {
/* ravg represents frequency scaled cpu-demand of tasks */
struct ravg {
/*
- * 'window_start' marks the beginning of new window
- *
* 'mark_start' marks the beginning of an event (task waking up, task
* starting to execute, task being preempted) within a window
*
@@ -1265,7 +1263,7 @@ struct ravg {
* 'demand' represents maximum sum seen over previous RAVG_HIST_SIZE
* windows. 'demand' could drive frequency demand for tasks.
*/
- u64 window_start, mark_start;
+ u64 mark_start;
u32 sum, demand;
u32 sum_history[RAVG_HIST_SIZE];
};