From: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
linux-kernel@vger.kernel.org, iommu@lists.linux.dev
Cc: joro@8bytes.org, joao.m.martins@oracle.com,
boris.ostrovsky@oracle.com, jon.grimm@amd.com,
santosh.shukla@amd.com, vasant.hegde@amd.com,
kishon.vijayabraham@amd.com
Subject: Re: [PATCH v2 3/5] iommu/amd: Introduce Disable IRTE Caching Support
Date: Mon, 22 May 2023 13:02:19 -0400 [thread overview]
Message-ID: <875e1afa-6bab-bddd-19d7-9f60b47c64f7@oracle.com> (raw)
In-Reply-To: <20230519005529.28171-4-suravee.suthikulpanit@amd.com>
Hi Suravee,
On 5/18/2023 8:55 PM, Suravee Suthikulpanit wrote:
> An Interrupt Remapping Table (IRT) stores interrupt remapping configuration
> for each device. In a normal operation, the AMD IOMMU caches the table
> to optimize subsequent data accesses. This requires the IOMMU driver to
> invalidate IRT whenever it updates the table. The invalidation process
> includes issuing an INVALIDATE_INTERRUPT_TABLE command following by
> a COMPLETION_WAIT command.
>
> However, there are cases in which the IRT is updated at a high rate.
> For example, for IOMMU AVIC, the IRTE[IsRun] bit is updated on every
> vcpu scheduling (i.e. amd_iommu_update_ga()). On system with large
> amount of vcpus and VFIO PCI pass-through devices, the invalidation
> process could potentially become a performance bottleneck.
>
> Introducing a new kernel boot option:
>
> amd_iommu=irtcachedis
>
> which disables IRTE caching by setting the IRTCachedis bit in each IOMMU
> Control register, and bypass the IRT invalidation process.
>
> Co-developed-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
> [Awaiting sign-off by Alejandro]
Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com
I sanity tested the kdump mechanism, and confirmed that
CONTROL_IRTCACHEDIS is set appropriately based on the irtcachedis kernel
parameter.
Also, I have not observed any errors during multiple rounds of testing
with large vCPU counts and VFIO passthrough devices under
interrupt-intensive workload that causes heavy vCPU scheduling activity
and exercises the relevant code path.
Thank you,
Alejandro
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> ---
> .../admin-guide/kernel-parameters.txt | 1 +
> drivers/iommu/amd/amd_iommu_types.h | 4 +++
> drivers/iommu/amd/init.c | 36 +++++++++++++++++++
> 3 files changed, 41 insertions(+)
>
>
next prev parent reply other threads:[~2023-05-22 17:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 0:55 [PATCH v2 0/5] iommu/amd: AVIC Interrupt Remapping Improvements Suravee Suthikulpanit
2023-05-19 0:55 ` [PATCH v2 1/5] iommu/amd: Switch amd_iommu_update_ga() to use modify_irte_ga() Suravee Suthikulpanit
2023-05-23 0:02 ` Jerry Snitselaar
2023-05-19 0:55 ` [PATCH v2 2/5] iommu/amd: Remove the unused struct amd_ir_data.ref Suravee Suthikulpanit
2023-05-23 0:03 ` Jerry Snitselaar
2023-05-19 0:55 ` [PATCH v2 3/5] iommu/amd: Introduce Disable IRTE Caching Support Suravee Suthikulpanit
2023-05-22 17:02 ` Alejandro Jimenez [this message]
2023-05-23 0:10 ` Jerry Snitselaar
2023-05-19 0:55 ` [PATCH v2 4/5] iommu/amd: Do not Invalidate IRT when disable IRTE caching Suravee Suthikulpanit
2023-05-23 0:17 ` jsnitsel
2023-05-23 3:38 ` Suthikulpanit, Suravee
2023-05-23 6:32 ` Joerg Roedel
2023-05-19 0:55 ` [PATCH v2 5/5] iommu/amd: Improving Interrupt Remapping Table Invalidation Suravee Suthikulpanit
2023-05-23 0:22 ` Jerry Snitselaar
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=875e1afa-6bab-bddd-19d7-9f60b47c64f7@oracle.com \
--to=alejandro.j.jimenez@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=iommu@lists.linux.dev \
--cc=joao.m.martins@oracle.com \
--cc=jon.grimm@amd.com \
--cc=joro@8bytes.org \
--cc=kishon.vijayabraham@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=santosh.shukla@amd.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=vasant.hegde@amd.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