All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] s390/idle: CPU idle driver
@ 2026-06-09  7:52 Mete Durlu
  2026-06-09  7:52 ` [PATCH 1/5] s390/tick: Remove CIF_NOHZ_DELAY flag Mete Durlu
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Mete Durlu @ 2026-06-09  7:52 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	Rafael J. Wysocki, Daniel Lezcano, Christian Loehle,
	Anna-Maria Behnsen, Frederic Weisbecker, Ingo Molnar,
	Thomas Gleixner
  Cc: Mete Durlu, Ilya Leoshkevich, Christian Borntraeger, linux-s390,
	linux-kernel

This patch series introduces a CPU idle driver for s390
architecture that leverages the existing cpu idle infrastructure and
TEO (Timer Events Oriented) governor to optimize idle state selection
based on timer events and interrupt patterns.

# Implementation Overview
-----------------------------------------------------------------------

The driver implements two idle states;

**Polling Idle (shallow state)**
- Busy-loop implementation that prevents SIE-exit during short idle periods
- Zero exit latency, optimized for latency-sensitive workloads
- Maintains CPU with the guest, improving response times

**Enabled Wait (deep state)**
- Traditional EW state that signals hypervisor availability
- Higher exit latency but more efficient for longer idle periods

The TEO governor dynamically selects between these states by monitoring
next timer interrupts and system interrupt frequency, choosing the most
appropriate idle state for each situation.

# Performance Benefits
-----------------------------------------------------------------------

Benchmark results across LPAR, KVM, and z/VM guests demonstrate significant
improvements for latency-sensitive and scheduler-intensive workloads:

```
Benchmark    | LPAR  | z/VM  | KVM   |
-----------------------------------------
cyclictest   | +45%  | +50%  | +30%  |
hackbench    | +5%   | +12%  | -     |
pgbench      | +2%   | +15%  | +2%   |
uperf        | +50%* | +-5%  | +-5%  |
```

*Single-threaded uperf scenarios show 50-70% improvements on LPAR.
Multi-threaded results show slight improvements overall.

Additionally, fio and ioping tests show latency distribution shifts toward
lower values with reduced minimum and average latencies.

# Configuration
-----------------------------------------------------------------------

Idle state parameters are tuned per hypervisor type after benchmarks:

**LPAR:**
- Polling: 5us target residency, 0us exit latency
- EW: 5us target residency, 5us exit latency

**KVM/z/VM:**
- Polling: 1us target residency, 0us exit latency  
- EW: 1us target residency, 1us exit latency


Mete Durlu (5):
  s390/tick: Remove CIF_NOHZ_DELAY flag
  tick: Remove arch_needs_cpu
  s390: Enable TIF_POLLING_NRFLAG
  s390/idle: Introduce cpuidle for s390
  s390/configs: Enable cpuidle driver on s390

 arch/s390/Kconfig                   |   5 ++
 arch/s390/configs/debug_defconfig   |   2 +
 arch/s390/configs/defconfig         |   2 +
 arch/s390/include/asm/processor.h   |   4 --
 arch/s390/include/asm/thread_info.h |   1 +
 arch/s390/kernel/idle.c             |   1 -
 arch/s390/kernel/irq.c              |   4 --
 arch/s390/kernel/smp.c              |   1 -
 drivers/cpuidle/Kconfig             |   5 ++
 drivers/cpuidle/Kconfig.s390        |  12 ++++
 drivers/cpuidle/Makefile            |   4 ++
 drivers/cpuidle/cpuidle-s390.c      | 104 ++++++++++++++++++++++++++++
 include/linux/tick.h                |   3 -
 kernel/time/tick-sched.c            |   7 +-
 14 files changed, 138 insertions(+), 17 deletions(-)
 create mode 100644 drivers/cpuidle/Kconfig.s390
 create mode 100644 drivers/cpuidle/cpuidle-s390.c

-- 
2.54.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-06-09 15:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09  7:52 [PATCH 0/5] s390/idle: CPU idle driver Mete Durlu
2026-06-09  7:52 ` [PATCH 1/5] s390/tick: Remove CIF_NOHZ_DELAY flag Mete Durlu
2026-06-09  8:10   ` Christian Loehle
2026-06-09  9:40     ` Mete Durlu
2026-06-09  9:52       ` Christian Loehle
2026-06-09 10:04         ` Mete Durlu
2026-06-09 10:39           ` Heiko Carstens
2026-06-09  7:52 ` [PATCH 2/5] tick: Remove arch_needs_cpu Mete Durlu
2026-06-09 15:06   ` Thomas Gleixner
2026-06-09  7:52 ` [PATCH 3/5] s390: Enable TIF_POLLING_NRFLAG Mete Durlu
2026-06-09  7:52 ` [PATCH 4/5] s390/idle: Introduce cpuidle for s390 Mete Durlu
2026-06-09  8:06   ` Christian Loehle
2026-06-09  8:12   ` Christian Loehle
2026-06-09  9:31     ` Mete Durlu
2026-06-09 10:40       ` Heiko Carstens
2026-06-09  7:52 ` [PATCH 5/5] s390/configs: Enable cpuidle driver on s390 Mete Durlu
2026-06-09  8:06 ` [PATCH 0/5] s390/idle: CPU idle driver Christian Loehle
2026-06-09  8:45   ` Mete Durlu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.