From: Baolu Lu <baolu.lu@linux.intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>,
iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
Matthew Brost <matthew.brost@intel.com>,
Robin Murphy <robin.murphy@arm.com>,
Will Deacon <will@kernel.org>
Cc: Francois Dugast <francois.dugast@intel.com>,
Joerg Roedel <joerg.roedel@amd.com>,
Kevin Tian <kevin.tian@intel.com>,
patches@lists.linux.dev
Subject: Re: [PATCH rc] iommupt: Only cache flush memory changed by unmap
Date: Wed, 28 Jan 2026 14:08:51 +0800 [thread overview]
Message-ID: <daf9e672-15c0-4726-9f2c-47f5018b126f@linux.intel.com> (raw)
In-Reply-To: <0-v1-21ee371752fc+4c-iommupt_unmap_cflush_jgg@nvidia.com>
On 1/25/26 05:00, Jason Gunthorpe wrote:
> The cache flush was happening on every level across the whole range of
> iteration, even if no leafs or tables were cleared. Instead flush only the
> sub range that was actually written.
>
> Overflushing isn't a correctness problem but it does impact the
> performance of unmap.
>
> After this series the performance compared to the original VT-d
> implementation with cache flushing turned on is:
>
> map_pages
> pgsz ,avg new,old ns, min new,old ns , min % (+ve is better)
> 2^12, 253,266 , 213,227 , 6.06
> 2^21, 246,244 , 221,219 , 0.00
> 2^30, 231,240 , 209,217 , 3.03
> 256*2^12, 2604,2668 , 2415,2540 , 4.04
> 256*2^21, 2495,2824 , 2390,2734 , 12.12
> 256*2^30, 2542,2845 , 2380,2718 , 12.12
>
> unmap_pages
> pgsz ,avg new,old ns, min new,old ns , min % (+ve is better)
> 2^12, 259,292 , 222,251 , 11.11
> 2^21, 255,259 , 227,236 , 3.03
> 2^30, 238,254 , 217,230 , 5.05
> 256*2^12, 2751,2620 , 2417,2437 , 0.00
> 256*2^21, 2461,2526 , 2377,2423 , 1.01
> 256*2^30, 2498,2543 , 2370,2404 , 1.01
>
> Fixes: efa03dab7ce4 ("iommupt: Flush the CPU cache after any writes to the page table")
> Reported-by: Francois Dugast<francois.dugast@intel.com>
> Closes:https://lore.kernel.org/all/20260121130233.257428-1-
> francois.dugast@intel.com/
> Signed-off-by: Jason Gunthorpe<jgg@nvidia.com>
> ---
> drivers/iommu/generic_pt/iommu_pt.h | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
Thanks for fixing this.
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
next prev parent reply other threads:[~2026-01-28 6:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-24 21:00 [PATCH rc] iommupt: Only cache flush memory changed by unmap Jason Gunthorpe
2026-01-26 7:33 ` Tian, Kevin
2026-01-26 14:14 ` Jason Gunthorpe
2026-01-27 7:33 ` Tian, Kevin
2026-01-26 20:07 ` Francois Dugast
2026-01-28 6:08 ` Baolu Lu [this message]
2026-01-28 14:14 ` Joerg Roedel
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=daf9e672-15c0-4726-9f2c-47f5018b126f@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=francois.dugast@intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joerg.roedel@amd.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=matthew.brost@intel.com \
--cc=patches@lists.linux.dev \
--cc=robin.murphy@arm.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