Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb61a9d9 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by Satya Durga Srinivasu Prabhala
Browse files

sched/walt: improve the scheduler



This change is for general scheduler improvement.

Change-Id: I01e6610bba2e8c66a628d6289eeed4e854264fdd
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 8c856f2d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ extern unsigned int sysctl_sched_boost;
extern unsigned int sysctl_sched_group_upmigrate_pct;
extern unsigned int sysctl_sched_group_downmigrate_pct;
extern unsigned int sysctl_sched_walt_rotate_big_tasks;
extern unsigned int sysctl_sched_min_task_util_for_boost_colocation;

extern int
walt_proc_update_handler(struct ctl_table *table, int write,
+8 −1
Original line number Diff line number Diff line
@@ -196,6 +196,11 @@ unsigned int sched_capacity_margin_up[NR_CPUS] = {
unsigned int sched_capacity_margin_down[NR_CPUS] = {
			[0 ... NR_CPUS-1] = 1205}; /* ~15% margin */

#ifdef CONFIG_SCHED_WALT
/* 1ms default for 20ms window size scaled to 1024 */
unsigned int sysctl_sched_min_task_util_for_boost_colocation = 51;
#endif

static inline void update_load_add(struct load_weight *lw, unsigned long inc)
{
	lw->weight += inc;
@@ -7625,7 +7630,9 @@ static inline struct cpumask *find_rtg_target(struct task_struct *p)
	rcu_read_lock();

	grp = task_related_thread_group(p);
	if (grp && grp->preferred_cluster) {
	if (grp && grp->preferred_cluster &&
			(task_util(p) >
			sysctl_sched_min_task_util_for_boost_colocation)) {
		rtg_target = &grp->preferred_cluster->cpus;
		if (!task_fits_max(p, cpumask_first(rtg_target)))
			rtg_target = NULL;
+11 −0
Original line number Diff line number Diff line
@@ -2906,6 +2906,17 @@ static inline bool task_boost_on_big_eligible(struct task_struct *p)
	bool boost_on_big = task_sched_boost(p) &&
				sched_boost_policy() == SCHED_BOOST_ON_BIG;

	if (boost_on_big) {
		/*
		 * Filter out tasks less than min task util threshold
		 * under conservative boost.
		 */
		if (sysctl_sched_boost == CONSERVATIVE_BOOST &&
				task_util(p) <=
				sysctl_sched_min_task_util_for_boost_colocation)
			boost_on_big = false;
	}

	return boost_on_big;
}

+9 −0
Original line number Diff line number Diff line
@@ -373,6 +373,15 @@ static struct ctl_table kern_table[] = {
		.extra1		= &zero,
		.extra2		= &one,
	},
	{
		.procname	= "sched_min_task_util_for_boost_colocation",
		.data		= &sysctl_sched_min_task_util_for_boost_colocation,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &one_thousand,
	},
#endif
	{
		.procname	= "sched_upmigrate",