[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH 3/4] VT-d: replace flush_all_cache()


  • To: "Beulich, Jan" <JBeulich@xxxxxxxx>, Andrew Cooper <amc96@xxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Fri, 24 Dec 2021 07:28:33 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+WIr3QNJxf/g4KZCWpJm34viTRnT1zlWpXoERz4strE=; b=mgzseInYCKq2mrO3b+eAzdMB1owhdh6pIgLAL6yjAmF2EXs4pcvHdQrXLF3NoCWPAM5mh0yvJ5RZZprj/6pgshQ1IV6G40Fv4FcH+i1gxD2od/CIxbIQ9F6mI7MEng7jLFCelbwgD/Zlv/1+fQjR651evWm2Fv0mgGgrrobBxihzVHgBGmxQhy9Lq3vwOo6VI6SX1k3VBRxcCevCL9wP8JlFPLhZrIviKfho1uBpYpG62SE32CCOZBWcpRSRXr2lzClfzqijIf6tjoyTr/VUQCyOy/GxoL3hbnMKRxsFAeAsFG11dmgfRzm1kTmUq7mhomHv0ylGSc7J1OPjjJLXWw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fk4RP9VRftZ7Elo7jn+uUHV8jgaRnkZpmYD9CP28RiR+7JltN9Lv7wd6ANl5Doq7HKI8CJscIuZnO4QEyV4dY0gkxDBhXcVmhqNLMP4PNljBB3aXRf1Wu1/zXFpuerUWJ+T41OUdhsj7S0c7OVcKWTTvareN42F0BidpBdJI61d0M5HeD5UuoX1xd2RggMQZ02gB5a3mrVWXdL8muiXZraBx/MkM3SZROm5PHOlZd5XIOD+jXbNwuq/8xSkuzamuGDHIzhFnlWXOgu4HJSlaWI1h9h07gpGm5e1cuksjbwEjAU7TFgB6t+uyIj/70dZbKleBCXUXY/QioMfqx1pcSw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
  • Cc: Paul Durrant <paul@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 24 Dec 2021 07:28:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHX5petNZzmre0QvUm2Tee8zq2soawdmhQAgAFLOQCAInz2cA==
  • Thread-topic: [PATCH 3/4] VT-d: replace flush_all_cache()

> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Thursday, December 2, 2021 4:48 PM
> 
> On 01.12.2021 14:02, Andrew Cooper wrote:
> > On 01/12/2021 09:41, Jan Beulich wrote:
> >> --- a/xen/drivers/passthrough/vtd/iommu.c
> >> +++ b/xen/drivers/passthrough/vtd/iommu.c
> >> @@ -591,7 +591,8 @@ static int __must_check iommu_flush_all(
> >>      bool_t flush_dev_iotlb;
> >>      int rc = 0;
> >>
> >> -    flush_all_cache();
> >> +    flush_local(FLUSH_CACHE);
> >
> > While I agree that the conversion is an improvement, the logic still
> > looks totally bogus.
> >
> > I can believe that it might have been a stopgap to fix problems before
> > we identified the need for sync_cache() for non-coherent IOMMUs, but
> > there's no need I can spot for any WBINVDs on any of these paths.
> >
> > I'm fairly sure this should just be dropped, and Xen will get faster as
> > a result.
> 
> Kevin, thoughts? I have to admit I'm hesitant to remove such code, when
> there's no clear indication why it's there. I'm also not sure how much
> of a win the dropping would be, considering the places where this
> function gets called from.
> 

me too. Could Andrew elaborate further on "fairly sure" part?

Thanks
Kevin

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.