All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: John Stultz <jstultz@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	John Dias <joaodias@google.com>,
	"Connor O'Brien" <connoro@google.com>,
	Rick Yiu <rickyiu@google.com>, John Kacur <jkacur@redhat.com>,
	Qais Yousef <qais.yousef@arm.com>,
	Chris Redpath <chris.redpath@arm.com>,
	Abhijeet Dharmapurikar <adharmap@quicinc.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Vasily Gorbik <gor@linux.ibm.com>,
	kernel-team@android.com, kernel test robot <lkp@intel.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>
Subject: Re: [RFC PATCH v3 1/3] softirq: Add generic accessor to percpu softirq_pending data
Date: Thu, 29 Sep 2022 12:05:04 +0200	[thread overview]
Message-ID: <YzVt0FVDPIPfsQ5t@osiris> (raw)
In-Reply-To: <20220921012550.3288570-2-jstultz@google.com>

On Wed, Sep 21, 2022 at 01:25:48AM +0000, John Stultz wrote:
> In a previous iteration of this patch series, I was checking:
> 
>    per_cpu(irq_stat, cpu).__softirq_pending
> 
> which resulted in build errors on s390.
> 
> This patch tries to create a generic accessor to this percpu
> softirq_pending data.
> 
> This interface is inherently racy as its reading percpu data
> without a lock. However, being able to peek at the softirq
> pending data allows us to make better decisions about rt task
> placement vs just ignoring it.
> 
> On s390 this call returns 0, which maybe isn't ideal but
> results in no functional change from what we do now.
> 
> Feedback or suggestions for better approach here would be
> welcome!
...
> diff --git a/arch/s390/include/asm/hardirq.h b/arch/s390/include/asm/hardirq.h
> index 58668ffb5488..cd9cc11588ab 100644
> --- a/arch/s390/include/asm/hardirq.h
> +++ b/arch/s390/include/asm/hardirq.h
> @@ -16,6 +16,12 @@
>  #define local_softirq_pending() (S390_lowcore.softirq_pending)
>  #define set_softirq_pending(x) (S390_lowcore.softirq_pending = (x))
>  #define or_softirq_pending(x)  (S390_lowcore.softirq_pending |= (x))
> +/*
> + *  Not sure what the right thing is here  for s390,
> + *  but returning 0 will result in no logical change
> + *  from what happens now
> + */
> +#define __cpu_softirq_pending(x) (0)

Hm, yes. This would require some ugly code to make this work properly,
plus might cause unique problems on s390 if the cpu in question is
offline.
So I'd say we might change s390 to use a proper per cpu irqstat
variable instead, if this new interface is being agreed on.

  reply	other threads:[~2022-09-29 10:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21  1:25 [RFC][PATCH v3 0/3] Softirq -rt Optimizations John Stultz
2022-09-21  1:25 ` [RFC PATCH v3 1/3] softirq: Add generic accessor to percpu softirq_pending data John Stultz
2022-09-29 10:05   ` Heiko Carstens [this message]
2022-09-21  1:25 ` [RFC PATCH v3 2/3] sched: Avoid placing RT threads on cores handling long softirqs John Stultz
2022-09-28 12:55   ` Qais Yousef
2022-10-03 16:55     ` John Stultz
2022-10-03 17:47       ` John Stultz
2022-10-04  9:50       ` David Laight
2022-10-05 15:46         ` Qais Yousef
2022-10-05 15:31       ` Qais Yousef
2022-09-21  1:25 ` [RFC PATCH v3 3/3] softirq: defer softirq processing to ksoftirqd if CPU is busy with RT John Stultz
2022-09-28 12:56   ` Qais Yousef
2022-10-03 18:43     ` John Stultz
2022-09-28 13:00 ` [RFC][PATCH v3 0/3] Softirq -rt Optimizations Qais Yousef
2022-09-28 13:51   ` David Laight
2022-09-28 15:56     ` Qais Yousef
2022-09-28 16:19       ` David Laight
2022-09-29 10:47         ` Qais Yousef

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=YzVt0FVDPIPfsQ5t@osiris \
    --to=hca@linux.ibm.com \
    --cc=adharmap@quicinc.com \
    --cc=agordeev@linux.ibm.com \
    --cc=chris.redpath@arm.com \
    --cc=connoro@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=gor@linux.ibm.com \
    --cc=jkacur@redhat.com \
    --cc=joaodias@google.com \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=rickyiu@google.com \
    --cc=rostedt@goodmis.org \
    --cc=svens@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.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 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.