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

Commit 14b0b5bc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: Take downmigrate threshold into consideration"

parents 122b6b43 72b68664
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1268,6 +1268,18 @@ CPU across all clusters. When this tunable is enabled, the RT tasks are
restricted to the lowest possible power cluster.


*** 7.25 sched_downmigrate

Appears at: /proc/sys/kernel/sched_downmigrate

Default value: 60

This tunable is a percentage. It exists to control hysteresis. Lets say a task
migrated to a high-performance cpu when it crossed 80% demand on a
power-efficient cpu. We don't let it come back to a power-efficient cpu until
its demand *in reference to the power-efficient cpu* drops less than 60%
(sched_downmigrate).

=========================
8. HMP SCHEDULER TRACE POINTS
=========================
+7 −1
Original line number Diff line number Diff line
@@ -2739,13 +2739,19 @@ done:

static int task_load_will_fit(struct task_struct *p, u64 task_load, int cpu)
{
	int upmigrate;

	if (cpu_capacity(cpu) == max_capacity)
		return 1;

	if (task_nice(p) > sched_upmigrate_min_nice || upmigrate_discouraged(p))
		return 1;

	if (task_load < sched_upmigrate)
	upmigrate = sched_upmigrate;
	if (cpu_capacity(task_cpu(p)) > cpu_capacity(cpu))
		upmigrate = sched_downmigrate;

	if (task_load < upmigrate)
		return 1;

	return 0;