[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f52edf70042b67f8b6306ca6f8be72ff569ee5ff.camel@amazon.com>
Date: Mon, 5 Jun 2023 16:10:51 +0000
From: "Gowans, James" <jgowans@...zon.com>
To: "maz@...nel.org" <maz@...nel.org>
CC: "tglx@...utronix.de" <tglx@...utronix.de>,
"Raslan, KarimAllah" <karahmed@...zon.com>,
"liaochang1@...wei.com" <liaochang1@...wei.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"zouyipeng@...wei.com" <zouyipeng@...wei.com>,
"chris.zjh@...wei.com" <chris.zjh@...wei.com>
Subject: Re: [PATCH 2/2] genirq: fasteoi resends interrupt on concurrent
invoke
Hi Marc,
On Thu, 2023-06-01 at 09:24 +0200, James Gowans wrote:
> While I'm glad that you eventually decided to use the resend mechanism
> > instead of spinning on the "old" CPU, I still think imposing this
> > behaviour on all users without any discrimination is wrong.
> >
> > Look at what it does if an interrupt is a wake-up source. You'd
> > pointlessly requeue the interrupt (bonus points if the irqchip doesn't
> > provide a HW-based retrigger mechanism).
> >
> > I still maintain that this change should only be applied for the
> > particular interrupts that *require* it, and not as a blanket change
> > affecting everything under the sun. I have proposed such a change in
> > the past, feel free to use it or roll your own.
>
> Thanks for the example of where this blanket functionality wouldn't be
> desired - I'll re-work this to introduce and use
> the IRQD_RESEND_WHEN_IN_PROGRESS flag as you originally suggested.
>
> Just one more thing before I post V3: are you okay with doing the resend
> here *after* the handler finished running, and using the IRQ_PENDING flag
> to know to resend it? Or would you like it to be resent in
> the !irq_may_run(desc) block as you suggested?
>
> I have a slight preference to do it after, only when we know it's ready to
> be run again, and hence not needed to modify check_irq_resend() to cater
> for multiple retries.
Hoping/assuming that you're okay with the keeping the resend at the end of
the function, here's V3:
https://lore.kernel.org/lkml/20230605155723.2628097-2-jgowans@amazon.com/
It's now very close to what to suggested originally. :-)
One thing: I'm not totally sure that it's necessary or correct to set this
flag on its_vpe_irq_domain_alloc() too - on my system (r6g.metal Graviton
2 host) that doesn't seem to be run. My guess is that it's for a GIC-v4
system which supports posted interrupt which generally get delivery
directly to the vCPU if running, but sometimes need to be delivered to the
hypervisor (for example if vCPU not running). I can try test this on
r7g.metal which might have GIC-v4 to be sure...
JG
Powered by blists - more mailing lists