From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Frederic Weisbecker <frederic@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
Boqun Feng <boqun.feng@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
Kieran Bingham <kbingham@kernel.org>,
Ben Segall <bsegall@google.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Ingo Molnar <mingo@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Juri Lelli <juri.lelli@redhat.com>,
Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
Xin Zhao <jackzxcui1989@163.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
linuxppc-dev@lists.ozlabs.org,
"Paul E . McKenney" <paulmck@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Uladzislau Rezki <urezki@gmail.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Heiko Carstens <hca@linux.ibm.com>,
linux-pm@vger.kernel.org,
Alexander Gordeev <agordeev@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Joel Fernandes <joelagnelf@nvidia.com>,
Nicholas Piggin <npiggin@gmail.com>,
linux-s390@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 00/15] tick/sched: Refactor idle cputime accounting
Date: Tue, 20 Jan 2026 18:12:08 +0530 [thread overview]
Message-ID: <a4037857-b161-4536-9a2e-2cf4c168736d@linux.ibm.com> (raw)
In-Reply-To: <aWpRxyt8HuXkSuxs@localhost.localdomain>
Hi Frederic.
On 1/16/26 8:27 PM, Frederic Weisbecker wrote:
> I forgot to mention I haven't yet tested CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
> (s390 and powerpc).
>
> Thanks.
tl;dr
I ran this on powerNV(Non virtualized) with 144 CPUs with below config. (default ones)
Patch *breaks* the cpu idle stats most of the time. idle values are wrong.
Detailed info:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
In config i have this:
CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
# CONFIG_IRQ_TIME_ACCOUNTING is not set
# CONFIG_BSD_PROCESS_ACCT is not set
+++++++++
When system is fully idle, i see this.
06:44:26 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
06:44:27 AM all 0.01 0.00 0.01 0.00 57.20 0.00 0.00 0.00 0.00 42.79
06:44:28 AM all 0.02 0.00 0.03 0.00 55.73 0.00 0.00 0.00 0.00 44.22
06:44:29 AM all 0.01 0.00 0.00 0.00 56.23 0.00 0.00 0.00 0.00 43.77
- Seeing 50%+ in irq time, which is clearly wrong.
+++++++++
When running stress-ng --cpu=72 (expectation is 50% idle time)
06:48:12 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
06:48:13 AM all 49.98 0.00 0.01 0.00 15.81 0.00 0.00 0.00 0.00 34.20
06:48:14 AM all 49.93 0.00 0.00 0.00 15.15 0.00 0.00 0.00 0.00 34.91
06:48:15 AM all 49.99 0.00 0.01 0.00 15.29 0.00 0.00 0.00 0.00 34.72
- Wrong values again. 50% is expected idle time.
+++++++++
system is idle again.
06:48:46 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
06:48:47 AM all 0.00 0.00 0.00 0.00 63.93 0.00 0.00 0.00 0.00 36.07
06:48:48 AM all 0.02 0.00 0.00 0.00 63.78 0.01 0.00 0.00 0.00 36.18
06:48:49 AM all 0.00 0.00 0.00 0.00 63.77 0.00 0.00 0.00 0.00 36.23
- Wrong values again. irq increased further.
+++++++++
I have seen the below warnings too.
WARNING: kernel/time/tick-sched.c:1353 at tick_nohz_idle_exit
[ T0] WARNING: kernel/time/tick-sched.c:1353 at tick_nohz_idle_exit+0x148/0x150, CPU#4: swapper/4/0
[ T0] Modules linked in: vmx_crypto gf128mul
[ T0] CPU: 4 UID: 0 PID: 0 Comm: swapper/4 Tainted: G W 6.19.0-rc5-00683-gbe7e8f3d5116 #61 PREEMPT(full)
[ T0] Tainted: [W]=WARN
[ T0] Hardware name: 0000000000000000 POWER9 0x4e1202 opal:v7.1 PowerNV
[ T0] NIP [c0000000002c8210] tick_nohz_idle_exit+0x148/0x150
[ T0] LR [c00000000022f10c] do_idle+0x1dc/0x328
WARNING: kernel/time/tick-sched.c:1274 at tick_nohz_get_sleep_length
T0] NIP [c0000000002c7fc0] tick_nohz_get_sleep_length+0x108/0x110
[ T0] LR [c000000000ca1548] menu_select+0x3c0/0x7b4
[ T0] Call Trace:
[ T0] [c000000003197e10] [c000000003197e50] 0xc000000003197e50 (unreliable)
[ T0] [c000000003197e50] [c000000000ca1548] menu_select+0x3c0/0x7b4
[ T0] [c000000003197ed0] [c000000000c9f120] cpuidle_select+0x34/0x48
[ T0] [c000000003197ef0] [c00000000022f184] do_idle+0x254/0x328
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I went back to baseline to confirm the original behaviour.
(d613f96096e4) Merge timers/vdso into tip/master
07:02:17 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
07:02:18 AM all 0.01 0.00 0.01 0.01 1.19 0.00 0.00 0.00 0.00 98.77
07:02:19 AM all 0.01 0.00 0.01 0.00 0.84 0.00 0.00 0.00 0.00 99.14
07:02:20 AM all 0.00 0.00 0.01 0.00 0.99 0.00 0.00 0.00 0.00 99.00
07:02:21 AM all 0.01 0.00 0.00 0.00 0.83 0.00 0.00 0.00 0.00 99.16
Which is the working as expected.
PS: Initial data. I haven't gone through the series yet.
next prev parent reply other threads:[~2026-01-20 12:43 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 14:51 [PATCH 00/15] tick/sched: Refactor idle cputime accounting Frederic Weisbecker
2026-01-16 14:51 ` [PATCH 01/15] sched/idle: Handle offlining first in idle loop Frederic Weisbecker
2026-01-19 12:53 ` Peter Zijlstra
2026-01-19 21:04 ` Frederic Weisbecker
2026-01-20 4:26 ` K Prateek Nayak
2026-01-20 14:52 ` Frederic Weisbecker
2026-01-16 14:51 ` [PATCH 02/15] sched/cputime: Remove superfluous and error prone kcpustat_field() parameter Frederic Weisbecker
2026-01-16 14:51 ` [PATCH 03/15] sched/cputime: Correctly support generic vtime idle time Frederic Weisbecker
2026-01-19 13:02 ` Peter Zijlstra
2026-01-19 21:35 ` Frederic Weisbecker
2026-01-16 14:51 ` [PATCH 04/15] powerpc/time: Prepare to stop elapsing in dynticks-idle Frederic Weisbecker
2026-02-25 17:53 ` Christophe Leroy (CS GROUP)
2026-01-16 14:51 ` [PATCH 05/15] s390/time: " Frederic Weisbecker
2026-01-21 12:17 ` Heiko Carstens
2026-01-21 18:04 ` Frederic Weisbecker
2026-01-22 14:40 ` Heiko Carstens
2026-01-27 14:45 ` Frederic Weisbecker
2026-01-16 14:51 ` [PATCH 06/15] tick/sched: Unify idle cputime accounting Frederic Weisbecker
2026-01-19 14:26 ` Peter Zijlstra
2026-01-19 22:00 ` Frederic Weisbecker
2026-01-16 14:52 ` [PATCH 07/15] cpufreq: ondemand: Simplify idle cputime granularity test Frederic Weisbecker
2026-01-19 5:37 ` Viresh Kumar
2026-01-19 12:30 ` Rafael J. Wysocki
2026-01-19 22:06 ` Frederic Weisbecker
2026-01-20 12:32 ` Rafael J. Wysocki
2026-01-20 14:28 ` Frederic Weisbecker
2026-01-16 14:52 ` [PATCH 08/15] tick/sched: Remove nohz disabled special case in cputime fetch Frederic Weisbecker
2026-01-16 14:52 ` [PATCH 09/15] tick/sched: Move dyntick-idle cputime accounting to cputime code Frederic Weisbecker
2026-01-19 14:35 ` Peter Zijlstra
2026-01-19 22:08 ` Frederic Weisbecker
2026-01-16 14:52 ` [PATCH 10/15] tick/sched: Remove unused fields Frederic Weisbecker
2026-01-16 14:52 ` [PATCH 11/15] tick/sched: Account tickless idle cputime only when tick is stopped Frederic Weisbecker
2026-01-16 14:52 ` [PATCH 12/15] tick/sched: Consolidate idle time fetching APIs Frederic Weisbecker
2026-01-16 14:52 ` [PATCH 13/15] sched/cputime: Consolidate get_cpu_[idle|iowait]_time_us() Frederic Weisbecker
2026-01-16 14:52 ` [PATCH 14/15] sched/cputime: Handle idle irqtime gracefully Frederic Weisbecker
2026-01-16 14:52 ` [PATCH 15/15] sched/cputime: Handle dyntick-idle steal time correctly Frederic Weisbecker
2026-01-16 14:57 ` [PATCH 00/15] tick/sched: Refactor idle cputime accounting Frederic Weisbecker
2026-01-20 12:42 ` Shrikanth Hegde [this message]
2026-01-21 16:55 ` Frederic Weisbecker
2026-01-19 14:53 ` Peter Zijlstra
2026-01-19 22:12 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4037857-b161-4536-9a2e-2cf4c168736d@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=anna-maria@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=borntraeger@linux.ibm.com \
--cc=bsegall@google.com \
--cc=chleroy@kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=frederic@kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jackzxcui1989@163.com \
--cc=jan.kiszka@siemens.com \
--cc=joelagnelf@nvidia.com \
--cc=juri.lelli@redhat.com \
--cc=kbingham@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=neeraj.upadhyay@kernel.org \
--cc=npiggin@gmail.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=urezki@gmail.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox