[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZeWTsTcK+3uvKeju@gmail.com>
Date: Mon, 4 Mar 2024 10:26:09 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Valentin Schneider <vschneid@...hat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/7] sched/balancing: Change 'enum cpu_idle_type' to have
more natural definitions
* Shrikanth Hegde <sshegde@...ux.ibm.com> wrote:
> I think its all getting accounted. Just that its not being printed. With
> the below change, able to see all the three types, albeit not in right
> order as per schedstat documentation.
>
> diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
> index 857f837f52cb..f36b54bdd9fa 100644
> --- a/kernel/sched/stats.c
> +++ b/kernel/sched/stats.c
> @@ -150,7 +150,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
>
> seq_printf(seq, "domain%d %*pb", dcount++,
> cpumask_pr_args(sched_domain_span(sd)));
> - for (itype = CPU_IDLE; itype < CPU_MAX_IDLE_TYPES;
> + for (itype = 0; itype < CPU_MAX_IDLE_TYPES;
> itype++) {
> seq_printf(seq, " %u %u %u %u %u %u %u %u",
> sd->lb_count[itype],
Indeed, good catch - there was an implicit reliance on CPU_IDLE's position
in the loop above that my patch didn't take into account.
Fixed.
Thanks,
Ingo
Powered by blists - more mailing lists