summaryrefslogtreecommitdiff
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2014-12-03 10:18:12 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:01:05 -0700
commit57ee8ef06eb2ac56c9c227e687e9df8d02bd691e (patch)
treea498be874ac73a63d4dccef81b177cbee608c4db /kernel/sched/sched.h
parentdc66ef50f5572f811e068a78ef99c92782fbfc0d (diff)
sched: Make RT tasks eligible for boost
During sched boost RT tasks currently end up going to the lowest power cluster. This can be a performance bottleneck especially if the frequency and IPC differences between clusters are high. Furthermore, when RT tasks go over to the little cluster during boost, the load balancer keeps attempting to pull work over to the big cluster. This results in pre-emption of the executing RT task causing more delays. Finally, containing more work on a single cluster during boost might help save some power if the little cluster can then enter deeper low power modes. Change-Id: I177b2e81be5657c23e7ac43889472561ce9993a9 Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r--kernel/sched/sched.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index fcdf4063ac11..117578626e8f 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -995,6 +995,11 @@ unsigned int max_task_load(void);
extern void sched_account_irqtime(int cpu, struct task_struct *curr,
u64 delta, u64 wallclock);
+static inline int capacity(struct rq *rq)
+{
+ return rq->capacity;
+}
+
static inline void
inc_cumulative_runnable_avg(struct rq *rq, struct task_struct *p)
{
@@ -1026,6 +1031,11 @@ dec_cumulative_runnable_avg(struct rq *rq, struct task_struct *p)
static inline int pct_task_load(struct task_struct *p) { return 0; }
+static inline int capacity(struct rq *rq)
+{
+ return SCHED_LOAD_SCALE;
+}
+
static inline void
inc_cumulative_runnable_avg(struct rq *rq, struct task_struct *p)
{
@@ -1120,6 +1130,7 @@ extern void set_hmp_defaults(void);
extern unsigned int power_cost_at_freq(int cpu, unsigned int freq);
extern void reset_all_window_stats(u64 window_start, unsigned int window_size);
extern void boost_kick(int cpu);
+extern int sched_boost(void);
#else /* CONFIG_SCHED_HMP */