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

Commit f9aa8547 authored by Joonwoo Park's avatar Joonwoo Park
Browse files

sched: avoid unnecessary multiplication and division



Avoid unnecessary multiplication and division when load scaling factor
is 1024.

Change-Id: If3cb63a77feaf49cc69ddec7f41cc3c1cabbfc5a
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent bcc5677f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -944,8 +944,10 @@ static inline u64 scale_load_to_cpu(u64 task_load, int cpu)
{
	struct rq *rq = cpu_rq(cpu);

	if (rq->load_scale_factor != 1024) {
		task_load *= (u64)rq->load_scale_factor;
		task_load /= 1024;
	}

	return task_load;
}