From: Marc Zyngier <maz@kernel.org>
To: Yifan Wu <wuyifan50@huawei.com>
Cc: <catalin.marinas@arm.com>, <will@kernel.org>,
<mark.rutland@arm.com>, <linux-arm-kernel@lists.infradead.org>,
<linuxarm@huawei.com>, <xiaqinxin@huawei.com>,
<yangyicong@huawei.com>, <wangyushan12@huawei.com>,
<wangzhou1@hisilicon.com>, <prime.zeng@hisilicon.com>,
<xuwei5@huawei.com>, <fanghao11@huawei.com>,
<jonathan.cameron@huawei.com>
Subject: Re: [PATCH] gic: increase the arch_timer priority to avoid hardlockup
Date: Thu, 16 Oct 2025 10:37:47 +0100 [thread overview]
Message-ID: <86zf9rw5jo.wl-maz@kernel.org> (raw)
In-Reply-To: <861pn3xqug.wl-maz@kernel.org>
On Thu, 16 Oct 2025 08:12:23 +0100,
Marc Zyngier <maz@kernel.org> wrote:
>
> On Thu, 16 Oct 2025 04:47:33 +0100,
> Yifan Wu <wuyifan50@huawei.com> wrote:
> >
> > From: Qinxin Xia <xiaqinxin@huawei.com>
> >
> > ----------------------------------------------------------------------
> >
> > On HIP12, when GIC receives multiple interrupts of the same priority and
> > different types, the interrupts are selected in the following sequence:
> > SPI > LPI > SGI > PPI. This scheduling rule may cause PPI starvation.
> > To prevent starvation from triggering system watchdog hardlockup, the
> > interrupt priority is explicitly increased in the arch_timer driver.
>
> No. This breaks pseudo NMIs, and is way too invasive. Also, how about
> the other PPIs? Frankly, if your GIC is not able to do some form of
> fair delivery, then it probably isn't fit for purpose.
Thinking about this some more, this is even worse than it looks.
Your GIC is, one way or another, implementing the interrupt classes as
a form of extra (sub-)priority bits, which breaks everything. How do
you want to solve this? By adding some other hardcoded priority
scheme. That's just as bad as the situation you have now.
What happens if, for example, your have a CPU with a screaming timer
interrupt and that another CPU tries to IPI it? Same problem, just
pushed one level further.
You cannot solve this by just moving from one bad priority scheme to
another. There is simply no priority scheme that can solve this,
because priorities are the exact opposite of fairness, and fairness is
the property we are relying on.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2025-10-16 9:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 3:47 [PATCH] gic: increase the arch_timer priority to avoid hardlockup Yifan Wu
2025-10-16 7:12 ` Marc Zyngier
2025-10-16 9:37 ` Marc Zyngier [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=86zf9rw5jo.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=fanghao11@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=mark.rutland@arm.com \
--cc=prime.zeng@hisilicon.com \
--cc=wangyushan12@huawei.com \
--cc=wangzhou1@hisilicon.com \
--cc=will@kernel.org \
--cc=wuyifan50@huawei.com \
--cc=xiaqinxin@huawei.com \
--cc=xuwei5@huawei.com \
--cc=yangyicong@huawei.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;
as well as URLs for NNTP newsgroup(s).