Re: [RFC PATCH 2/3] s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait()
From: Frederic Weisbecker
Date: Wed Mar 11 2026 - 12:14:24 EST
Le Wed, Feb 25, 2026 at 03:51:45PM +0100, Heiko Carstens a écrit :
> diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
> index 4873fe9d891b..19fd1541a0f3 100644
> --- a/arch/s390/kernel/entry.S
> +++ b/arch/s390/kernel/entry.S
> @@ -378,8 +378,13 @@ SYM_CODE_END(pgm_check_handler)
> SYM_CODE_START(\name)
> STMG_LC %r8,%r15,__LC_SAVE_AREA
> GET_LC %r13
> - stckf __LC_INT_CLOCK(%r13)
> + lg %r12,__LC_IDLE_DATA(%r13)
> + asi __IDLE_SEQUENCE(%r12),1
> + stcke __LC_INT_CLOCK(%r13)
> stpt __LC_SYS_ENTER_TIMER(%r13)
> + mvc __IDLE_CLOCK_EXIT(16,%r12),__LC_INT_CLOCK(%r13)
> + ALTERNATIVE "bcr 15,0", "bcr 14,0", ALT_FACILITY(45)
> + asi __IDLE_SEQUENCE(%r12),1
Would it be possible to instead do that with &kc->idle_sleeptime_seq ?
This should sum up to a simple increment as well. This way you don't need
those nested seqcounts.
Thanks.
--
Frederic Weisbecker
SUSE Labs