From: "Anthoine Bourgeois" <anthoine.bourgeois@vates.tech>
To: "Juergen Gross" <jgross@suse.com>
Cc: xen-devel@lists.xenproject.org,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>
Subject: Re: [PATCH] xen/netfront: Fix TX response spurious interrupts
Date: Mon, 14 Jul 2025 07:11:06 +0000 [thread overview]
Message-ID: <aHSth3FOCpiRRfwv@mail.vates.tech> (raw)
In-Reply-To: <d2c05c2b-ee50-4121-bedd-17ec6bcfa75f@suse.com>
On Fri, Jul 11, 2025 at 05:33:43PM +0200, Juergen Gross wrote:
>On 10.07.25 18:11, Anthoine Bourgeois wrote:
>> We found at Vates that there are lot of spurious interrupts when
>> benchmarking the PV drivers of Xen. This issue appeared with a patch
>> that addresses security issue XSA-391 (see Fixes below). On an iperf
>> benchmark, spurious interrupts can represent up to 50% of the
>> interrupts.
>>
>> Spurious interrupts are interrupts that are rised for nothing, there is
>> no work to do. This appends because the function that handles the
>> interrupts ("xennet_tx_buf_gc") is also called at the end of the request
>> path to garbage collect the responses received during the transmission
>> load.
>>
>> The request path is doing the work that the interrupt handler should
>> have done otherwise. This is particurary true when there is more than
>> one vcpu and get worse linearly with the number of vcpu/queue.
>>
>> Moreover, this problem is amplifyed by the penalty imposed by a spurious
>> interrupt. When an interrupt is found spurious the interrupt chip will
>> delay the EOI to slowdown the backend. This delay will allow more
>> responses to be handled by the request path and then there will be more
>> chance the next interrupt will not find any work to do, creating a new
>> spurious interrupt.
>>
>> This causes performance issue. The solution here is to remove the calls
>> from the request path and let the interrupt handler do the processing of
>> the responses. This approch removes spurious interrupts (<0.05%) and
>> also has the benefit of freeing up cycles in the request path, allowing
>> it to process more work, which improves performance compared to masking
>> the spurious interrupt one way or another.
>>
>> Some vif throughput performance figures from a 8 vCPUs, 4GB of RAM HVM
>> guest(s):
>>
>> Without this patch on the :
>> vm -> dom0: 4.5Gb/s
>> vm -> vm: 7.0Gb/s
>>
>> Without XSA-391 patch (revert of b27d47950e48):
>> vm -> dom0: 8.3Gb/s
>> vm -> vm: 8.7Gb/s
>>
>> With XSA-391 and this patch:
>> vm -> dom0: 11.5Gb/s
>> vm -> vm: 12.6Gb/s
>>
>> Fixes: b27d47950e48 ("xen/netfront: harden netfront against event channel storms")
>> Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@vates.tech>
>
>Please resend this patch with the relevant maintainers added in the
>recipients list.
Ok, I will resend the patch tomorrow.
>
>You can add my Reviewed-by: tag, of course.
Thanks!
Anthoine
Anthoine Bourgeois | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
next prev parent reply other threads:[~2025-07-14 7:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 16:11 [PATCH] xen/netfront: Fix TX response spurious interrupts Anthoine Bourgeois
2025-07-10 20:05 ` Elliott Mitchell
2025-07-11 7:41 ` Anthoine Bourgeois
2025-07-11 21:22 ` Elliott Mitchell
2025-07-11 9:29 ` Teddy Astie
2025-07-11 15:27 ` Jürgen Groß
2025-07-11 15:28 ` Jürgen Groß
2025-07-11 15:33 ` Juergen Gross
2025-07-14 7:11 ` Anthoine Bourgeois [this message]
2025-07-15 0:37 ` Elliott Mitchell
2025-07-15 8:21 ` Anthoine Bourgeois
2025-07-15 19:19 ` Elliott Mitchell
2025-07-16 7:47 ` Anthoine Bourgeois
2025-07-16 18:31 ` Elliott Mitchell
2025-07-18 20:48 ` Elliott Mitchell
2025-07-21 9:51 ` Anthoine Bourgeois
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=aHSth3FOCpiRRfwv@mail.vates.tech \
--to=anthoine.bourgeois@vates.tech \
--cc=jgross@suse.com \
--cc=oleksandr_tyshchenko@epam.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 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.