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

Commit c81d9cc6 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

sched/walt: Improve the scheduler



This change is for general scheduler improvement.

Change-Id: Iabcf202a551861f848c36dcd145f5bfb493a02ca
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent c0835c6a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -78,10 +78,12 @@ static void sched_full_throttle_boost_exit(void)
static void sched_conservative_boost_enter(void)
{
	update_cgroup_boost_settings();
	sched_task_filter_util = sysctl_sched_min_task_util_for_boost;
}

static void sched_conservative_boost_exit(void)
{
	sched_task_filter_util = sysctl_sched_min_task_util_for_colocation;
	restore_cgroup_boost_settings();
}

+2 −5
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ unsigned int sched_capacity_margin_down[NR_CPUS] = {
unsigned int sysctl_sched_min_task_util_for_boost = 51;
/* 0.68ms default for 20ms window size scaled to 1024 */
unsigned int sysctl_sched_min_task_util_for_colocation = 35;
unsigned int sched_task_filter_util = 35;
#endif
unsigned int sched_small_task_threshold = 102;

@@ -7384,11 +7385,7 @@ static inline int wake_to_idle(struct task_struct *p)
#ifdef CONFIG_SCHED_WALT
static inline bool is_task_util_above_min_thresh(struct task_struct *p)
{
	unsigned int threshold = (sched_boost() == CONSERVATIVE_BOOST) ?
			sysctl_sched_min_task_util_for_boost :
			sysctl_sched_min_task_util_for_colocation;

	return task_util(p) > threshold;
	return task_util(p) > sched_task_filter_util;
}

static inline struct cpumask *find_rtg_target(struct task_struct *p)
+2 −3
Original line number Diff line number Diff line
@@ -2994,6 +2994,7 @@ static inline int same_freq_domain(int src_cpu, int dst_cpu)
#define	CPU_RESERVED	1

extern enum sched_boost_policy boost_policy;
extern unsigned int sched_task_filter_util;
static inline enum sched_boost_policy sched_boost_policy(void)
{
	return boost_policy;
@@ -3122,9 +3123,7 @@ static inline enum sched_boost_policy task_boost_policy(struct task_struct *p)
		 * Filter out tasks less than min task util threshold
		 * under conservative boost.
		 */
		if (sched_boost() == CONSERVATIVE_BOOST &&
				task_util(p) <=
				sysctl_sched_min_task_util_for_boost)
		if (task_util(p) <= sched_task_filter_util)
			policy = SCHED_BOOST_NONE;
	}