All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Yipeng Zou <zouyipeng@huawei.com>
Cc: <tglx@linutronix.de>, <samuel@sholland.org>,
	<oleksandr_tyshchenko@epam.com>, <andy.shevchenko@gmail.com>,
	<apatel@ventanamicro.com>, <lvjianmin@loongson.cn>,
	<linux-kernel@vger.kernel.org>, <chris.zjh@huawei.com>,
	<liaochang1@huawei.com>, James Gowans <jgowans@amazon.com>
Subject: Re: [RFC PATCH] genirq: introduce handle_fasteoi_edge_irq flow handler
Date: Fri, 14 Apr 2023 12:25:51 +0100	[thread overview]
Message-ID: <86edomln7k.wl-maz@kernel.org> (raw)
In-Reply-To: <20230310101417.1081434-1-zouyipeng@huawei.com>

On Fri, 10 Mar 2023 10:14:17 +0000,
Yipeng Zou <zouyipeng@huawei.com> wrote:
> 
> Recently, We have a LPI migration issue on the ARM SMP platform.
> 
> For example, NIC device generates MSI and sends LPI to CPU0 via ITS,
> meanwhile irqbalance running on CPU1 set irq affinity of NIC to CPU1,
> the next interrupt will be sent to CPU2, due to the state of irq is
> still in progress, kernel does not end up performing irq handler on
> CPU2, which results in some userland service timeouts, the sequence
> of events is shown as follows:
> 
> NIC                     CPU0                    CPU1
> 
> Generate IRQ#1          READ_IAR
>                         Lock irq_desc
>                         Set IRQD_IN_PROGRESS
>                         Unlock irq_desc
>                                                 Lock irq_desc
>                                                 Change LPI Affinity
>                                                 Unlock irq_desc
>                         Call irq_handler
> Generate IRQ#2
>                                                 READ_IAR
>                                                 Lock irq_desc
>                                                 Check IRQD_IN_PROGRESS
>                                                 Unlock irq_desc
>                                                 Return from interrupt#2
>                         Lock irq_desc
>                         Clear IRQD_IN_PROGRESS
>                         Unlock irq_desc
>                         return from interrupt#1
> 
> For this scenario, The IRQ#2 will be lost. This does cause some exceptions.

Please see my reply to James at [1]. I'd appreciate if you could give
that patch a go, which I expect to be a better avenue to fix what is
effectively a GIC architecture defect.

Thanks,

	M.

[1] https://lore.kernel.org/all/86pm89kyyt.wl-maz@kernel.org/

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2023-04-14 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 10:14 [RFC PATCH] genirq: introduce handle_fasteoi_edge_irq flow handler Yipeng Zou
2023-04-14 11:25 ` Marc Zyngier [this message]
2023-04-15  1:38   ` Yipeng Zou

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=86edomln7k.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=apatel@ventanamicro.com \
    --cc=chris.zjh@huawei.com \
    --cc=jgowans@amazon.com \
    --cc=liaochang1@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvjianmin@loongson.cn \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=samuel@sholland.org \
    --cc=tglx@linutronix.de \
    --cc=zouyipeng@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 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.