lkml.org 
[lkml]   [2024]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 2/2] iommu/vt-d: Fix NULL domain on device release
Date
> From: Baolu Lu <baolu.lu@linux.intel.com>
> Sent: Monday, March 4, 2024 4:07 PM
>
> On 2024/3/4 15:36, Tian, Kevin wrote:
> >> From: Lu Baolu <baolu.lu@linux.intel.com>
> >> Sent: Thursday, February 29, 2024 5:46 PM
> >>
> >> +
> >> +/*
> >> + * Cache invalidation for changes to a scalable-mode context table
> >> + * entry.
> >> + *
> >> + * Section 6.5.3.3 of the VT-d spec:
> >> + * - Device-selective context-cache invalidation;
> >> + * - Domain-selective PASID-cache invalidation to affected domains
> >> + * (can be skipped if all PASID entries were not-present);
> >> + * - Domain-selective IOTLB invalidation to affected domains;
> >
> > the spec talks about domain-selective but the code actually does
> > global invalidation.
>
> I should have included the following comments below:
>
> /* Given that we have no idea about which domain IDs and PASIDs were
> * used in the pasid table, upgrade them to global PASID and IOTLB
> * cache invalidation. This doesn't impact the performance significantly
> * as the clearing context entry is not a critical path.
> */
>

but then it affects all other perf-critical paths which rely on the cache
for other devices...

It's preferable to restrict overhead to this release path only e.g. walking
the PASID table to identify affected DIDs and PASIDs instead of expanding
the impact to system wide.
\
 
 \ /
  Last update: 2024-05-27 15:33    [W:0.057 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site