diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2016-12-19 17:04:54 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-19 17:04:54 -0800 |
commit | e26b0777dc92ab47d16b0134e57cd1c9e1083a9a (patch) | |
tree | 6896cfb7a25310fb4f871b86d74f939d9727c3d4 /kernel/sched/sched.h | |
parent | af833ae6a86db02de5cd1347779470485f80f5ce (diff) | |
parent | 0dee0d1411e4ba837089a769a5bcce57a5a14df2 (diff) |
Merge "sched: Avoid waking idle cpu for short-burst tasks"
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index bcf3f019a300..ae7442007e8b 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1216,6 +1216,11 @@ static inline int cpu_max_power_cost(int cpu) return cpu_rq(cpu)->cluster->max_power_cost; } +static inline int cpu_min_power_cost(int cpu) +{ + return cpu_rq(cpu)->cluster->min_power_cost; +} + static inline u32 cpu_cycles_to_freq(u64 cycles, u32 period) { return div64_u64(cycles, period); @@ -1413,6 +1418,11 @@ static inline u64 cpu_cravg_sync(int cpu, int sync) return load; } +static inline bool is_short_burst_task(struct task_struct *p) +{ + return p->ravg.avg_burst < sysctl_sched_short_burst; +} + extern void check_for_migration(struct rq *rq, struct task_struct *p); extern void pre_big_task_count_change(const struct cpumask *cpus); extern void post_big_task_count_change(const struct cpumask *cpus); |