sched/walt: Improve the scheduler

This change is for general scheduler improvement.

Change-Id: Id1692f724f2efd22ada3365cebd154f1999930b5
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
[clingutla@codeaurora.org: Resolved trivial merge conflicts]
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
This commit is contained in:
Pavankumar Kondeti 2020-09-07 09:35:49 +05:30 committed by Lingutla Chandrasekhar
parent 3273595440
commit 6dc3ebb376
5 changed files with 8 additions and 7 deletions

View file

@ -59,7 +59,7 @@ extern unsigned int sysctl_sched_ravg_window_nr_ticks;
extern unsigned int 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 unsigned int sysctl_walt_low_latency_task_threshold;
extern int
walt_proc_group_thresholds_handler(struct ctl_table *table, int write,

View file

@ -1267,7 +1267,7 @@ TRACE_EVENT(sched_task_util,
__entry->start_cpu = start_cpu;
#ifdef CONFIG_SCHED_WALT
__entry->unfilter = p->unfilter;
__entry->low_latency = p->low_latency;
__entry->low_latency = walt_low_latency_task(p);
#else
__entry->unfilter = 0;
__entry->low_latency = 0;

View file

@ -177,7 +177,7 @@ unsigned int sysctl_sched_min_task_util_for_boost = 51;
unsigned int sysctl_sched_min_task_util_for_colocation = 35;
__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 */
unsigned int sysctl_walt_low_latency_task_threshold; /* disabled by default */
#endif
unsigned int sched_small_task_threshold = 102;
__read_mostly unsigned int sysctl_sched_force_lb_enable = 1;

View file

@ -2911,7 +2911,8 @@ static inline bool task_rtg_high_prio(struct task_struct *p)
static inline bool walt_low_latency_task(struct task_struct *p)
{
return sysctl_walt_low_latency_task_boost && p->low_latency;
return p->low_latency &&
(task_util(p) < sysctl_walt_low_latency_task_threshold);
}
/* Is frequency of two cpus synchronized with each other? */

View file

@ -580,13 +580,13 @@ static struct ctl_table kern_table[] = {
.extra2 = &max_cfs_boost_prio,
},
{
.procname = "walt_low_latency_task_boost",
.data = &sysctl_walt_low_latency_task_boost,
.procname = "walt_low_latency_task_threshold",
.data = &sysctl_walt_low_latency_task_threshold,
.maxlen = sizeof(unsigned int),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
.extra1 = &zero,
.extra2 = &one,
.extra2 = &one_thousand,
},
#endif
{