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

Commit 192b5f39 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/walt: don't account CPU idle exit time to task demand"

parents d1b9638a ad8d7042
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;
@@ -7629,7 +7634,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;
}

+7 −0
Original line number Diff line number Diff line
@@ -1609,6 +1609,13 @@ account_busy_for_task_demand(struct rq *rq, struct task_struct *p, int event)
			 (event == PICK_NEXT_TASK || event == TASK_MIGRATE)))
		return 0;

	/*
	 * The idle exit time is not accounted for the first task _picked_ up to
	 * run on the idle CPU.
	 */
	if (event == PICK_NEXT_TASK && rq->curr == rq->idle)
		return 0;

	/*
	 * TASK_UPDATE can be called on sleeping task, when its moved between
	 * related groups
+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",