[PATCH 0/4] s390: Idle time accounting improvements

Heiko Carstens posted 4 patches 4 weeks ago
arch/s390/include/asm/idle.h      |  14 ++--
arch/s390/include/asm/lowcore.h   |   4 +-
arch/s390/include/asm/timex.h     |  20 +----
arch/s390/include/asm/tod_types.h |  30 +++++++
arch/s390/include/asm/vtime.h     |   4 +-
arch/s390/kernel/asm-offsets.c    |   7 ++
arch/s390/kernel/entry.S          |  14 +++-
arch/s390/kernel/idle.c           | 129 +++++++++++++++++++++++-------
arch/s390/kernel/irq.c            |   7 +-
arch/s390/kernel/smp.c            |  33 +-------
arch/s390/kernel/vtime.c          |  55 +------------
drivers/s390/cio/qdio_main.c      |   2 +-
drivers/s390/cio/qdio_thinint.c   |   2 +-
include/linux/kernel_stat.h       |  27 +++++++
include/linux/vtime.h             |   6 ++
kernel/sched/cputime.c            |   4 +-
16 files changed, 203 insertions(+), 155 deletions(-)
create mode 100644 arch/s390/include/asm/tod_types.h
[PATCH 0/4] s390: Idle time accounting improvements
Posted by Heiko Carstens 4 weeks ago
This series is on top of Frederic Weisbecker's idle cpu time accounting
refactor series [1][2].

This is supposed to improve s390 idle time accounting, and brings it
back to the state it was before arch_cpu_idle_time() was removed from
s390 [3].

In result all cpu time accounting is done by the s390 architecture backend
again, instead of having a mix of architecure specific and common code
accounting (common code: idle, s390 architecture: everything else).

Changes since RFC [4]:

- Split into more patches

- Fix various build errors for !CONFIG_NO_HZ_COMMON

- Get rid of private seqcount implementation and access seqcount from
  kernel_cpustat directly from assembler code, as suggested by Frederic
  Weisbecker

[1] https://lore.kernel.org/all/20260508131647.43868-1-frederic@kernel.org/
[2] git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git timers/core-v4
[3] commit be76ea614460 ("s390/idle: remove arch_cpu_idle_time() and corresponding code")
[4] https://lore.kernel.org/all/20260225145146.1031705-1-hca@linux.ibm.com/

Heiko Carstens (4):
  s390/timex: Move union tod_clock type to separate header
  s390/irq/idle: Use stcke instead of stckf for time stamps
  s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait()
  s390/idle: Remove idle time and count sysfs files

 arch/s390/include/asm/idle.h      |  14 ++--
 arch/s390/include/asm/lowcore.h   |   4 +-
 arch/s390/include/asm/timex.h     |  20 +----
 arch/s390/include/asm/tod_types.h |  30 +++++++
 arch/s390/include/asm/vtime.h     |   4 +-
 arch/s390/kernel/asm-offsets.c    |   7 ++
 arch/s390/kernel/entry.S          |  14 +++-
 arch/s390/kernel/idle.c           | 129 +++++++++++++++++++++++-------
 arch/s390/kernel/irq.c            |   7 +-
 arch/s390/kernel/smp.c            |  33 +-------
 arch/s390/kernel/vtime.c          |  55 +------------
 drivers/s390/cio/qdio_main.c      |   2 +-
 drivers/s390/cio/qdio_thinint.c   |   2 +-
 include/linux/kernel_stat.h       |  27 +++++++
 include/linux/vtime.h             |   6 ++
 kernel/sched/cputime.c            |   4 +-
 16 files changed, 203 insertions(+), 155 deletions(-)
 create mode 100644 arch/s390/include/asm/tod_types.h

base-commit: e64ba052ce04e363ff76d3cb8bedc5f812188acb
-- 
2.51.0
Re: [PATCH 0/4] s390: Idle time accounting improvements
Posted by Heiko Carstens 2 days, 21 hours ago
On Wed, May 13, 2026 at 04:01:25PM +0200, Heiko Carstens wrote:
> This series is on top of Frederic Weisbecker's idle cpu time accounting
> refactor series [1][2].
> 
> This is supposed to improve s390 idle time accounting, and brings it
> back to the state it was before arch_cpu_idle_time() was removed from
> s390 [3].
> 
> In result all cpu time accounting is done by the s390 architecture backend
> again, instead of having a mix of architecure specific and common code
> accounting (common code: idle, s390 architecture: everything else).

Thomas, Peter, Frederic, any objections to this series? The third patch
touches common code, so I'd like to get an ACK for that.

If there is agreement, this could go either via tip tree's timers/nohz branch
(series applies cleanly), or via s390, after the nohz branch has been merged
upstream.

[Full quote below for reference]

> Changes since RFC [4]:
> 
> - Split into more patches
> 
> - Fix various build errors for !CONFIG_NO_HZ_COMMON
> 
> - Get rid of private seqcount implementation and access seqcount from
>   kernel_cpustat directly from assembler code, as suggested by Frederic
>   Weisbecker
> 
> [1] https://lore.kernel.org/all/20260508131647.43868-1-frederic@kernel.org/
> [2] git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git timers/core-v4
> [3] commit be76ea614460 ("s390/idle: remove arch_cpu_idle_time() and corresponding code")
> [4] https://lore.kernel.org/all/20260225145146.1031705-1-hca@linux.ibm.com/
> 
> Heiko Carstens (4):
>   s390/timex: Move union tod_clock type to separate header
>   s390/irq/idle: Use stcke instead of stckf for time stamps
>   s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait()
>   s390/idle: Remove idle time and count sysfs files
> 
>  arch/s390/include/asm/idle.h      |  14 ++--
>  arch/s390/include/asm/lowcore.h   |   4 +-
>  arch/s390/include/asm/timex.h     |  20 +----
>  arch/s390/include/asm/tod_types.h |  30 +++++++
>  arch/s390/include/asm/vtime.h     |   4 +-
>  arch/s390/kernel/asm-offsets.c    |   7 ++
>  arch/s390/kernel/entry.S          |  14 +++-
>  arch/s390/kernel/idle.c           | 129 +++++++++++++++++++++++-------
>  arch/s390/kernel/irq.c            |   7 +-
>  arch/s390/kernel/smp.c            |  33 +-------
>  arch/s390/kernel/vtime.c          |  55 +------------
>  drivers/s390/cio/qdio_main.c      |   2 +-
>  drivers/s390/cio/qdio_thinint.c   |   2 +-
>  include/linux/kernel_stat.h       |  27 +++++++
>  include/linux/vtime.h             |   6 ++
>  kernel/sched/cputime.c            |   4 +-
>  16 files changed, 203 insertions(+), 155 deletions(-)
>  create mode 100644 arch/s390/include/asm/tod_types.h
> 
> base-commit: e64ba052ce04e363ff76d3cb8bedc5f812188acb
> -- 
> 2.51.0
> 
>
Re: [PATCH 0/4] s390: Idle time accounting improvements
Posted by Frederic Weisbecker 1 day, 15 hours ago
Le Mon, Jun 08, 2026 at 09:55:00AM +0200, Heiko Carstens a écrit :
> On Wed, May 13, 2026 at 04:01:25PM +0200, Heiko Carstens wrote:
> > This series is on top of Frederic Weisbecker's idle cpu time accounting
> > refactor series [1][2].
> > 
> > This is supposed to improve s390 idle time accounting, and brings it
> > back to the state it was before arch_cpu_idle_time() was removed from
> > s390 [3].
> > 
> > In result all cpu time accounting is done by the s390 architecture backend
> > again, instead of having a mix of architecure specific and common code
> > accounting (common code: idle, s390 architecture: everything else).
> 
> Thomas, Peter, Frederic, any objections to this series? The third patch
> touches common code, so I'd like to get an ACK for that.
> 
> If there is agreement, this could go either via tip tree's timers/nohz branch
> (series applies cleanly), or via s390, after the nohz branch has been merged
> upstream.

Looks all good to me, thanks!

Acked-by: Frederic Weisbecker <frederic@kernel.org>

I guess ideally it should go via s390. Any chance you can push this to this
merge window right after tip:timers/nohz is merged?

-- 
Frederic Weisbecker
SUSE Labs
Re: [PATCH 0/4] s390: Idle time accounting improvements
Posted by Heiko Carstens 1 day, 15 hours ago
On Tue, Jun 09, 2026 at 03:55:57PM +0200, Frederic Weisbecker wrote:
> Le Mon, Jun 08, 2026 at 09:55:00AM +0200, Heiko Carstens a écrit :
> > On Wed, May 13, 2026 at 04:01:25PM +0200, Heiko Carstens wrote:
> > > This series is on top of Frederic Weisbecker's idle cpu time accounting
> > > refactor series [1][2].
> > > 
> > > This is supposed to improve s390 idle time accounting, and brings it
> > > back to the state it was before arch_cpu_idle_time() was removed from
> > > s390 [3].
> > > 
> > > In result all cpu time accounting is done by the s390 architecture backend
> > > again, instead of having a mix of architecure specific and common code
> > > accounting (common code: idle, s390 architecture: everything else).
> > 
> > Thomas, Peter, Frederic, any objections to this series? The third patch
> > touches common code, so I'd like to get an ACK for that.
> > 
> > If there is agreement, this could go either via tip tree's timers/nohz branch
> > (series applies cleanly), or via s390, after the nohz branch has been merged
> > upstream.
> 
> Looks all good to me, thanks!
> 
> Acked-by: Frederic Weisbecker <frederic@kernel.org>

Thank you!

> I guess ideally it should go via s390. Any chance you can push this to this
> merge window right after tip:timers/nohz is merged?

Yes, sure.