[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240503104605.1871571-1-dietmar.eggemann@arm.com>
Date: Fri, 3 May 2024 12:46:05 +0200
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Valentin Schneider <vschneid@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] sched/fair: Add stats update for cfs_rq->exec_clock in update_curr() again
Commit 5d69eca542ee ("sched: Unify runtime accounting across classes")
removed it and since then:
echo 1 > /proc/sys/kernel/sched_schedstats
cat /sys/kernel/debug/sched/debug | grep exec_clock
returns:
.exec_clock : 0.000000
for all cfs_rq's.
Put the schedstat_add() back to be able to watch the cfs_rq runtime
statistic.
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@....com>
---
kernel/sched/fair.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 9eb63573110c..37bb3cee6fec 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1158,6 +1158,7 @@ static void update_curr(struct cfs_rq *cfs_rq)
delta_exec = update_curr_se(rq_of(cfs_rq), curr);
if (unlikely(delta_exec <= 0))
return;
+ schedstat_add(cfs_rq->exec_clock, delta_exec);
curr->vruntime += calc_delta_fair(delta_exec, curr);
update_deadline(cfs_rq, curr);
--
2.25.1
Powered by blists - more mailing lists