mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
sched/walt: Improve the scheduler
This change is for general scheduler improvement. Change-Id: Ia728ecbc780c9d172b49029ef3c87c6b3b490872 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
487ed773a1
commit
2c80b14d6a
4 changed files with 17 additions and 1 deletions
|
|
@ -56,6 +56,7 @@ extern unsigned int __weak sysctl_sched_many_wakeup_threshold;
|
|||
extern unsigned int __weak sysctl_sched_dynamic_ravg_window_enable;
|
||||
extern unsigned int sysctl_sched_prefer_spread;
|
||||
extern unsigned int sysctl_walt_rtg_cfs_boost_prio;
|
||||
extern unsigned int sysctl_walt_low_latency_task_boost;
|
||||
|
||||
extern int
|
||||
walt_proc_group_thresholds_handler(struct ctl_table *table, int write,
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ unsigned int sched_capacity_margin_down[NR_CPUS] = {
|
|||
#ifdef CONFIG_SCHED_WALT
|
||||
__read_mostly unsigned int sysctl_sched_prefer_spread;
|
||||
unsigned int sysctl_walt_rtg_cfs_boost_prio = 99; /* disabled by default */
|
||||
unsigned int sysctl_walt_low_latency_task_boost; /* disabled by default */
|
||||
#endif
|
||||
unsigned int sched_small_task_threshold = 102;
|
||||
|
||||
|
|
@ -4077,7 +4078,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
|
|||
TASK_BOOST_STRICT_MAX)
|
||||
vruntime -= sysctl_sched_latency;
|
||||
#ifdef CONFIG_SCHED_WALT
|
||||
else if (task_of(se)->wts.low_latency ||
|
||||
else if (walt_low_latency_task(task_of(se)) ||
|
||||
task_rtg_high_prio(task_of(se))) {
|
||||
vruntime -= sysctl_sched_latency;
|
||||
vruntime -= thresh;
|
||||
|
|
|
|||
|
|
@ -3004,6 +3004,11 @@ static inline struct walt_related_thread_group
|
|||
return rcu_dereference(p->wts.grp);
|
||||
}
|
||||
|
||||
static inline bool walt_low_latency_task(struct task_struct *p)
|
||||
{
|
||||
return sysctl_walt_low_latency_task_boost && p->wts.low_latency;
|
||||
}
|
||||
|
||||
/* Is frequency of two cpus synchronized with each other? */
|
||||
static inline int same_freq_domain(int src_cpu, int dst_cpu)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -563,6 +563,15 @@ static struct ctl_table kern_table[] = {
|
|||
.extra1 = &min_cfs_boost_prio,
|
||||
.extra2 = &max_cfs_boost_prio,
|
||||
},
|
||||
{
|
||||
.procname = "walt_low_latency_task_boost",
|
||||
.data = &sysctl_walt_low_latency_task_boost,
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = SYSCTL_ZERO,
|
||||
.extra2 = SYSCTL_ONE,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SCHED_DEBUG
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue