Linux s390 Architecture development
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: Frederic Weisbecker <frederic@kernel.org>,
	 Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@kernel.org>,
	 Alexander Gordeev <agordeev@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	 Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	 linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH 3/4] s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait()
Date: Wed, 17 Jun 2026 16:18:14 +0200	[thread overview]
Message-ID: <ajKsG0JP6qTssQBX@monoceros> (raw)
In-Reply-To: <20260513140129.4100822-4-hca@linux.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1810 bytes --]

Hello,

On Wed, May 13, 2026 at 04:01:28PM +0200, Heiko Carstens wrote:
> The former s390 specific arch_cpu_idle_time() implementation was
> removed, since its implementation was racy and reported idle time
> could go backwards [1].
> 
> However this removal was not necessary, since independently of the s390
> architecture specific races there exists the iowait counter update race,
> which can also lead to reported idle time going backwards [2].
> 
> With Frederic Weisbecker's recent cpu idle time accounting refactoring
> kernel_cpustat got a sequence counter. Use this to implement s390 specific
> variants of kcpustat_field_idle() and kcpustat_field_iowait(). This is
> logically a revert of [1] and moves cpu idle time accounting back into s390
> architecture code, which is also more precise than the dyntick idle time
> accounting by nohz/scheduler.
> 
> For comparing cross cpu time stamps it is necessary to use the stcke
> instead of the stckf instruction in irq entry path. Furthermore this
> open-codes a sequence lock in assembler and C code, which is required to
> update the irq entry time stamp to the per cpu idle_data structure in a
> race free manner.
> 
> [1] commit be76ea614460 ("s390/idle: remove arch_cpu_idle_time() and corresponding code")
> [2] commit ead70b752373 ("timers/nohz: Add a comment about broken iowait counter update race")
> 
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

This patch became 670e057744e0cc8047bf96d15d18c46e16ae2e93 and is
included in next-20260616.

s390 allmodconfig fails to build with:

ERROR: modpost: "arch_kcpustat_field_idle" [drivers/leds/trigger/ledtrig-activity.ko] undefined!
ERROR: modpost: "arch_kcpustat_field_iowait" [drivers/leds/trigger/ledtrig-activity.ko] undefined!

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-06-17 14:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 14:01 [PATCH 0/4] s390: Idle time accounting improvements Heiko Carstens
2026-05-13 14:01 ` [PATCH 1/4] s390/timex: Move union tod_clock type to separate header Heiko Carstens
2026-05-13 14:01 ` [PATCH 2/4] s390/irq/idle: Use stcke instead of stckf for time stamps Heiko Carstens
2026-05-13 14:01 ` [PATCH 3/4] s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait() Heiko Carstens
2026-06-17 14:18   ` Uwe Kleine-König [this message]
2026-06-17 14:33     ` Heiko Carstens
2026-05-13 14:01 ` [PATCH 4/4] s390/idle: Remove idle time and count sysfs files Heiko Carstens
2026-06-08  7:55 ` [PATCH 0/4] s390: Idle time accounting improvements Heiko Carstens
2026-06-09 13:55   ` Frederic Weisbecker
2026-06-09 14:14     ` Heiko Carstens

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=ajKsG0JP6qTssQBX@monoceros \
    --to=u.kleine-koenig@baylibre.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=frederic@kernel.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=svens@linux.ibm.com \
    --cc=tglx@kernel.org \
    /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