diff options
| author | Srivatsa Vaddagiri <vatsa@codeaurora.org> | 2015-04-24 15:44:31 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:25:12 -0700 |
| commit | 3004236139377ad667ce13fdda58f931992fd7cc (patch) | |
| tree | 5eba74172347dcc86ece116a32140d888d202864 /include/linux | |
| parent | df6bfcaf70e9552bc7076fa0749f4f5c632897eb (diff) | |
sched: colocate related threads
Provide userspace interface for tasks to be grouped together as
"related" threads. For example, all threads involved in updating
display buffer could be tagged as related.
Scheduler will attempt to provide special treatment for group of
related threads such as:
1) Colocation of related threads in same "preferred" cluster
2) Aggregation of demand towards determination of cluster frequency
This patch extends scheduler to provide best-effort colocation support
for a group of related threads.
Change-Id: Ic2cd769faf5da4d03a8f3cb0ada6224d0101a5f5
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
[joonwoop@codeaurora.org: fixed minor merge conflicts. removed ifdefry
for CONFIG_SCHED_QHMP.]
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 4 | ||||
| -rw-r--r-- | include/linux/sched/sysctl.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index c5ac73a2a30a..b61d039b665f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1460,6 +1460,8 @@ struct task_struct { u32 init_load_pct; u64 last_wake_ts; u64 last_switch_out_ts; + struct related_thread_group *grp; + struct list_head grp_list; #endif #ifdef CONFIG_CGROUP_SCHED struct task_group *sched_task_group; @@ -2357,6 +2359,8 @@ static inline void sched_set_cluster_dstate(const cpumask_t *cluster_cpus, extern int sched_set_wake_up_idle(struct task_struct *p, int wake_up_idle); extern u32 sched_get_wake_up_idle(struct task_struct *p); +extern int sched_set_group_id(struct task_struct *p, unsigned int group_id); +extern unsigned int sched_get_group_id(struct task_struct *p); #ifdef CONFIG_SCHED_HMP diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h index d309c5d5d584..395b7c25250b 100644 --- a/include/linux/sched/sysctl.h +++ b/include/linux/sched/sysctl.h @@ -70,6 +70,7 @@ extern unsigned int sysctl_sched_lowspill_freq; extern unsigned int sysctl_sched_pack_freq; extern unsigned int sysctl_sched_boost; extern unsigned int sysctl_sched_select_prev_cpu_us; +extern unsigned int sysctl_sched_enable_colocation; #if defined(CONFIG_SCHED_FREQ_INPUT) extern unsigned int sysctl_sched_new_task_windows; #endif |
