public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: 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: [RFC PATCH 2/3] s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait()
Date: Fri, 20 Mar 2026 13:30:40 +0100	[thread overview]
Message-ID: <20260320123040.9681B35-hca@linux.ibm.com> (raw)
In-Reply-To: <abGUxzhVmz2YOaEj@localhost.localdomain>

On Wed, Mar 11, 2026 at 05:13:59PM +0100, Frederic Weisbecker wrote:
> 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.

Yes, that was my first thought when implementing this. But decided
against it since I thought it wouldn't be such a good idea to directly
access members of common code locking structures from asm
code. However, since you mention this too, I'll reconsider :)

Please move forward with your current patch set and ignore this patch
for now. I'll provide an updated version later, however will be on
vacation for now.

  reply	other threads:[~2026-03-20 12:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 14:51 [RFC PATCH 0/3] s390: Idle time accounting improvements Heiko Carstens
2026-02-25 14:51 ` [RFC PATCH 1/3] fixup! s390/time: Prepare to stop elapsing in dynticks-idle Heiko Carstens
2026-03-11 15:14   ` Frederic Weisbecker
2026-02-25 14:51 ` [RFC PATCH 2/3] s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait() Heiko Carstens
2026-03-11 16:13   ` Frederic Weisbecker
2026-03-20 12:30     ` Heiko Carstens [this message]
2026-02-25 14:51 ` [RFC PATCH 3/3] s390/idle: Remove idle time and count sysfs files Heiko Carstens
2026-03-11 16:14   ` 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=20260320123040.9681B35-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=frederic@kernel.org \
    --cc=gor@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=svens@linux.ibm.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