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 <[email protected]>
---
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
Hi Dietmar Eggemann,
On 03/05/24 16:16, Dietmar Eggemann wrote:
> 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 <[email protected]>
> ---
> 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);
Able to see the stats now with the patch.
Tested-by: Madadi Vineeth Reddy <[email protected]>
Thanks and Regards
Madadi Vineeth Reddy