From: Marc Zyngier <maz@kernel.org>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Marcin Wojtas <mw@semihalf.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
John Garry <john.garry@huawei.com>,
kernel-team@android.com
Subject: [PATCH 0/2] net: mvpp2: Survive CPU hotplug events
Date: Wed, 16 Feb 2022 09:08:43 +0000 [thread overview]
Message-ID: <20220216090845.1278114-1-maz@kernel.org> (raw)
I recently realised that playing with CPU hotplug on a system equiped
with a set of MVPP2 devices (Marvell 8040) was fraught with danger and
would result in a rapid lockup or panic.
As it turns out, the per-CPU nature of the MVPP2 interrupts are
getting in the way. A good solution for this seems to rely on the
kernel's managed interrupt approach, where the core kernel will not
move interrupts around as the CPUs for down, but will simply disable
the corresponding interrupt.
Converting the driver to this requires a bit of refactoring in the IRQ
subsystem to expose the required primitive, as well as a bit of
surgery in the driver itself.
Note that although the system now survives such event, the driver
seems to assume that all queues are always active and doesn't inform
the device that a CPU has gone away. Someout who actually understand
this driver should have a look at it.
Patches on top of 5.17-rc3, lightly tested on a McBin.
Marc Zyngier (2):
genirq: Extract irq_set_affinity_masks() from
devm_platform_get_irqs_affinity()
net: mvpp2: Convert to managed interrupts to fix CPU HP issues
drivers/base/platform.c | 20 +-----
drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 -
.../net/ethernet/marvell/mvpp2/mvpp2_main.c | 67 ++++++++++---------
include/linux/interrupt.h | 8 +++
kernel/irq/affinity.c | 27 ++++++++
5 files changed, 72 insertions(+), 51 deletions(-)
--
2.30.2
next reply other threads:[~2022-02-16 9:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 9:08 Marc Zyngier [this message]
2022-02-16 9:08 ` [PATCH 1/2] genirq: Extract irq_set_affinity_masks() from devm_platform_get_irqs_affinity() Marc Zyngier
2022-02-16 10:56 ` Greg Kroah-Hartman
2022-02-17 17:07 ` John Garry
2022-02-17 17:17 ` Marc Zyngier
2022-02-18 8:41 ` John Garry
2022-03-15 14:25 ` Thomas Gleixner
2022-02-16 9:08 ` [PATCH 2/2] net: mvpp2: Convert to managed interrupts to fix CPU HP issues Marc Zyngier
2022-02-16 11:38 ` Marc Zyngier
2022-02-16 13:19 ` [PATCH 0/2] net: mvpp2: Survive CPU hotplug events Marcin Wojtas
2022-02-16 13:29 ` Marc Zyngier
2022-02-16 13:32 ` Marcin Wojtas
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=20220216090845.1278114-1-maz@kernel.org \
--to=maz@kernel.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=john.garry@huawei.com \
--cc=kernel-team@android.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).