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

Commit b224647f authored by Brendan Jackman's avatar Brendan Jackman Committed by Chris Redpath
Browse files

DEBUG: sched/fair: Fix sched_load_avg_cpu events for task_groups



The current sched_load_avg_cpu event traces the load for any cfs_rq that is
updated. This is not representative of the CPU load - instead we should only
trace this event when the cfs_rq being updated is in the root_task_group.

Change-Id: I345c2f13f6b5718cb4a89beb247f7887ce97ed6b
Signed-off-by: default avatarBrendan Jackman <brendan.jackman@arm.com>
(cherry picked from commit 1cb392e10307ba3ef7d9a602e59e54ae3b6399ad)
(cherry picked from commit 835f5ebd2f7170c87dc1387976ed1b4e46215251)
Signed-off-by: default avatarQuentin Perret <quentin.perret@arm.com>
parent 0f493a73
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3080,6 +3080,8 @@ update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq, bool update_freq)
	if (update_freq && (decayed || removed_util))
		cfs_rq_util_change(cfs_rq);

	/* Trace CPU load, unless cfs_rq belongs to a non-root task_group */
	if (cfs_rq == &rq_of(cfs_rq)->cfs)
		trace_sched_load_avg_cpu(cpu_of(rq_of(cfs_rq)), cfs_rq);

	return decayed || removed_load;