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

Commit 43980276 authored by Satya Durga Srinivasu Prabhala's avatar Satya Durga Srinivasu Prabhala Committed by Gerrit - the friendly Code Review server
Browse files

sched/sched_avg: make number of running tasks conservative



Right now if a task ran 15% in the previous window, that task is
considered as part of number of running tasks as well as while
calculating misfit tasks on smaller capacity clusters which
agressively un-isolates higher capacity CPUs and may lead to
more power consumption. To avoid such issues, make number of
running tasks conservative by changing threshold to 85%.

Change-Id: Ic82724b822bb605fbda385ddeb50a591757d2c9d
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 746245c8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ static s64 last_get_time;

static DEFINE_PER_CPU(atomic64_t, last_busy_time) = ATOMIC64_INIT(0);

#define NR_THRESHOLD_PCT		85
#define NR_THRESHOLD_PCT		15

/**
 * sched_get_nr_running_avg
@@ -76,7 +76,7 @@ void sched_get_nr_running_avg(struct sched_avg_stats *stats)

		/*
		 * NR_THRESHOLD_PCT is to make sure that the task ran
		 * at least 15% in the last window to compensate any
		 * at least 85% in the last window to compensate any
		 * over estimating being done.
		 */
		stats[cpu].nr = (int)div64_u64((tmp_nr + NR_THRESHOLD_PCT),