From: Vasant Hegde <vasant.hegde@amd.com>
To: Guanghui Feng <guanghuifeng@linux.alibaba.com>,
joro@8bytes.org, suravee.suthikulpanit@amd.com, will@kernel.org,
robin.murphy@arm.com
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] iommu/amd: Skip device lookup when IRT caching is disabled
Date: Mon, 23 Nov 2026 14:48:01 +0530 [thread overview]
Message-ID: <1ad6f235-ac3f-4afd-927f-246948c6b4b6@amd.com> (raw)
In-Reply-To: <20261113095017.1835921-2-guanghuifeng@linux.alibaba.com>
Hi Guanghui,
On 11/13/2026 3:20 PM, Guanghui Feng wrote:
> The DMA alias invalidation path looks up the device before checking
> irtcachedis_enabled. The lookup walks the PCI segment's device list,
> but its result is unused when IRT caching is disabled.
>
> Nested VM entry and exit can switch multiple interrupt routes between
> guest and remapping modes, repeating this lookup for each IRTE update.
> A reported nested virtualization workload scans 4334 device entries per
> lookup, with median lookup latencies of 22-33 us despite IRT caching
> being disabled.
>
> Move the lookup after the early return. This removes the unnecessary
> list walk without changing alias invalidation or completion handling
> when IRT caching is enabled.
Thanks for the analysis and the patch.
Patch 2/2 removes search_dev_data completely as dev_data is passed to this
function. Do we really need this patch?
-Vasant
next prev parent reply other threads:[~2026-11-23 9:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 9:50 [PATCH 0/2] iommu/amd: Optimize IRT cache invalidation for nested VM workloads Guanghui Feng
2026-11-13 9:50 ` [PATCH 1/2] iommu/amd: Skip device lookup when IRT caching is disabled Guanghui Feng
2026-11-23 9:18 ` Vasant Hegde [this message]
2026-11-13 9:50 ` [PATCH 2/2] iommu/amd: Reuse device data for IRTE cache invalidation Guanghui Feng
2026-11-23 9:35 ` Vasant Hegde
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=1ad6f235-ac3f-4afd-927f-246948c6b4b6@amd.com \
--to=vasant.hegde@amd.com \
--cc=guanghuifeng@linux.alibaba.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®