From 33af11b6f4238f34860e305cf7610021ea8036b4 Mon Sep 17 00:00:00 2001 From: Srivatsa Vaddagiri Date: Tue, 4 Nov 2014 14:24:19 +0530 Subject: sched: Add API to set task's initial task load Add a per-task attribute, init_load_pct, that is used to initialize newly created children's initial task load. This helps important applications launch their child tasks on cpus with highest capacity. Change-Id: Ie9665fd2aeb15203f95fd7f211c50bebbaa18727 Signed-off-by: Srivatsa Vaddagiri [joonwoop@codeaurora.org: fixed conflict int init_new_task_load. se.avg.runnable_avg_sum has deprecated.] Signed-off-by: Joonwoo Park --- include/linux/sched.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux') diff --git a/include/linux/sched.h b/include/linux/sched.h index 31a9756b06dc..740696b0a57d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1448,6 +1448,11 @@ struct task_struct { struct sched_rt_entity rt; #ifdef CONFIG_SCHED_HMP struct ravg ravg; + /* + * 'init_load_pct' represents the initial task load assigned to children + * of this task + */ + u32 init_load_pct; #endif #ifdef CONFIG_CGROUP_SCHED struct task_group *sched_task_group; @@ -2323,6 +2328,8 @@ sched_set_cpu_cstate(int cpu, int cstate, int wakeup_energy, int wakeup_latency) #ifdef CONFIG_SCHED_HMP extern int sched_set_boost(int enable); +extern int sched_set_init_task_load(struct task_struct *p, int init_load_pct); +extern u32 sched_get_init_task_load(struct task_struct *p); #else static inline int sched_set_boost(int enable) { -- cgit v1.2.3