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

Commit 241a319a authored by Joonwoo Park's avatar Joonwoo Park Committed by Todd Kjos
Browse files

sched: deadline: WALT: account cumulative runnable avg



Account cumulative runnable average for WALT CPU utilization accounting.

Change-Id: I56934894e626dec183740eeaf89a57d2ef638143
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit 26b37261ea25c6928c6a69e77a8f7d39ee3267c9)
Signed-off-by: default avatarQuentin Perret <quentin.perret@arm.com>
parent dac2e9ca
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@

#include <linux/slab.h>

#include "walt.h"

struct dl_bandwidth def_dl_bandwidth;

static inline struct task_struct *dl_task_of(struct sched_dl_entity *dl_se)
@@ -829,6 +831,7 @@ void inc_dl_tasks(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
	WARN_ON(!dl_prio(prio));
	dl_rq->dl_nr_running++;
	add_nr_running(rq_of_dl_rq(dl_rq), 1);
	walt_inc_cumulative_runnable_avg(rq_of_dl_rq(dl_rq), dl_task_of(dl_se));

	inc_dl_deadline(dl_rq, deadline);
	inc_dl_migration(dl_se, dl_rq);
@@ -843,6 +846,7 @@ void dec_dl_tasks(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
	WARN_ON(!dl_rq->dl_nr_running);
	dl_rq->dl_nr_running--;
	sub_nr_running(rq_of_dl_rq(dl_rq), 1);
	walt_dec_cumulative_runnable_avg(rq_of_dl_rq(dl_rq), dl_task_of(dl_se));

	dec_dl_deadline(dl_rq, dl_se->deadline);
	dec_dl_migration(dl_se, dl_rq);