From: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
To: Marc Zyngier <maz@kernel.org>,
LAK <linux-arm-kernel@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Cc: Will Deacon <will@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Valentin Schneider <Valentin.Schneider@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Mark Rutland <mark.rutland@arm.com>,
Russell King <linux@arm.linux.org.uk>,
Android Kernel Team <kernel-team@android.com>,
dickey@codeaurora.org, Yuichi Ito <ito-yuichi@fujitsu.com>
Subject: Re: [PATCH v2 0/6] arm/arm64: Allow the rescheduling IPI to bypass irq_enter/exit
Date: Fri, 18 Jun 2021 12:30:22 -0700 [thread overview]
Message-ID: <32d7376c-8b30-7729-25d7-b0fb24be57cf@codeaurora.org> (raw)
In-Reply-To: <20201124141449.572446-1-maz@kernel.org>
Hello All,
We are seeing significant improvements in time it takes for a task to be
woken up on an idle cpu with these patches.
A trace output without
<<< 96uS total cost: cpu 1 wakes up rt-app task on cpu 2 >>>
rt-app-955 [001] 149.387611: sched_wakeup_new:
comm=rt-app pid=957 prio=120 target_cpu=002
rt-app-955 [001] 149.387616: ipi_raise:
target_mask=00000000,00000004 (Rescheduling interrupts)
<idle>-0 [002] 149.387622: cpu_idle:
state=4294967295 cpu_id=2
<idle>-0 [002] 149.387640: irq_handler_entry: irq=1
name=IPI
<idle>-0 [002] 149.387643: ipi_entry: (Rescheduling
interrupts)
<idle>-0 [002] 149.387646: ipi_exit: (Rescheduling
interrupts)
<idle>-0 [002] 149.387648: irq_handler_exit: irq=1
ret=handled
<idle>-0 [002] 149.387707: sched_switch:
prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=R ==>
next_comm=rt-app next_pid=957 next_prio=120
With the patches.
<<< 68uS total cost: cpu 1 wakes up T0 on cpu 3 >>>
rt-app-956 [001] 28.034953: sched_wakeup_new:
comm=rt-app pid=958 prio=120 target_cpu=003
rt-app-956 [001] 28.034958: ipi_raise:
target_mask=00000000,00000008 (Rescheduling interrupts)
<idle>-0 [003] 28.034964: cpu_idle:
state=4294967295 cpu_id=3
<idle>-0 [003] 28.034970: irq_handler_entry: irq=1
name=IPI
<idle>-0 [003] 28.034974: ipi_entry: (Rescheduling
interrupts)
<idle>-0 [003] 28.034977: ipi_exit: (Rescheduling
interrupts)
<idle>-0 [003] 28.034979: irq_handler_exit: irq=1
ret=handled
<idle>-0 [003] 28.035021: sched_switch:
prev_comm=swapper/3 prev_pid=0 prev_prio=120 prev_state=R ==>
next_comm=rt-app next_pid=958 next_prio=120
This was taken on a snapdragon device similar to 8350. This patch
series helps in reducing the load time on idle cpus and thereby increase
performance KPIs on various benchmarks.
Sent this data in hopes that we resurrect the discussion and get these
fixes in.
Thanks,
Abhijeet
On 11/24/2020 6:14 AM, Marc Zyngier wrote:
> This is the second version of my earlier series [1], which aims at
> fixing (or papering over, depending on how you look at things) a
> performance regression seen on arm64 for reched IPI heavy workloads
> (such as "perf bench sched pipe").
>
> As eloquently described by Thomas in his earlier replies [2], the
> current situation is less than ideal on most architecture except x86,
> and my conclusion is that what was broken in 5.9 wouldn't be more
> broken in 5.10 with these patches (and addresses the performance
> regression).
>
> Needless to say, I intend to try and help fixing the issues Thomas
> mentioned, and I believe that Mark (cc'd) already has something that
> could be used as a healthy starting point (Mark, do correct me if I
> misrepresented your work).
>
> Thanks,
>
> M.
>
> * From v1:
> - Added a new __irq_modify_status() helper
> - Renamed IRQ_NAKED to IRQ_RAW
> - Renamed IRQ_HIDDEN to IRQ_IPI
> - Applied the same workaround to 32bit ARM for completeness
>
> [1] https://lore.kernel.org/r/20201101131430.257038-1-maz@kernel.org/
> [2] https://lore.kernel.org/r/87lfewnmdz.fsf@nanos.tec.linutronix.de/
>
> Marc Zyngier (6):
> genirq: Add __irq_modify_status() helper to clear/set special flags
> genirq: Allow an interrupt to be marked as 'raw'
> arm64: Mark the recheduling IPI as raw interrupt
> arm: Mark the recheduling IPI as raw interrupt
> genirq: Drop IRQ_HIDDEN from IRQF_MODIFY_MASK
> genirq: Rename IRQ_HIDDEN to IRQ_IPI
>
> arch/arm/Kconfig | 1 +
> arch/arm/kernel/smp.c | 6 +++++-
> arch/arm64/Kconfig | 1 +
> arch/arm64/kernel/smp.c | 6 +++++-
> include/linux/irq.h | 11 ++++++++---
> kernel/irq/Kconfig | 3 +++
> kernel/irq/chip.c | 12 ++++++++++--
> kernel/irq/debugfs.c | 3 ++-
> kernel/irq/irqdesc.c | 17 ++++++++++++-----
> kernel/irq/proc.c | 2 +-
> kernel/irq/settings.h | 33 +++++++++++++++++++++++++++------
> 11 files changed, 75 insertions(+), 20 deletions(-)
>
prev parent reply other threads:[~2021-06-18 19:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 14:14 [PATCH v2 0/6] arm/arm64: Allow the rescheduling IPI to bypass irq_enter/exit Marc Zyngier
2020-11-24 14:14 ` [PATCH v2 1/6] genirq: Add __irq_modify_status() helper to clear/set special flags Marc Zyngier
2020-11-24 14:14 ` [PATCH v2 2/6] genirq: Allow an interrupt to be marked as 'raw' Marc Zyngier
2020-11-24 16:26 ` Peter Zijlstra
2020-11-24 16:56 ` Marc Zyngier
2020-11-26 18:18 ` Valentin Schneider
2020-12-03 13:03 ` Peter Zijlstra
2020-12-03 15:52 ` Valentin Schneider
2020-12-05 19:24 ` Valentin Schneider
2020-12-10 15:07 ` Will Deacon
2021-06-23 17:28 ` Todd Kjos
2020-11-24 14:14 ` [PATCH v2 3/6] arm64: Mark the recheduling IPI as raw interrupt Marc Zyngier
2020-12-10 15:15 ` Will Deacon
2020-11-24 14:14 ` [PATCH v2 4/6] arm: " Marc Zyngier
2020-11-24 14:14 ` [PATCH v2 5/6] genirq: Drop IRQ_HIDDEN from IRQF_MODIFY_MASK Marc Zyngier
2020-11-24 14:14 ` [PATCH v2 6/6] genirq: Rename IRQ_HIDDEN to IRQ_IPI Marc Zyngier
2020-11-26 18:18 ` Valentin Schneider
2021-03-01 0:39 ` [PATCH v2 0/6] arm/arm64: Allow the rescheduling IPI to bypass irq_enter/exit ito-yuichi
2021-03-01 9:22 ` Marc Zyngier
2021-03-09 6:20 ` Yuichi Ito
2021-06-18 19:30 ` Abhijeet Dharmapurikar [this message]
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=32d7376c-8b30-7729-25d7-b0fb24be57cf@codeaurora.org \
--to=adharmap@codeaurora.org \
--cc=Valentin.Schneider@arm.com \
--cc=catalin.marinas@arm.com \
--cc=dickey@codeaurora.org \
--cc=ito-yuichi@fujitsu.com \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox