[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/4] VT-d: replace flush_all_cache()
- To: Andrew Cooper <amc96@xxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 2 Dec 2021 09:47:32 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=IX8V4+u3EsAJbStITWzswPVE23pfTomwmiRAJcDmu/g=; b=R5u7Ew9f8scikvOU2Ns59desO9rPiX2B8Y0iyu2muxw54WE/2aSZ2XZrOzG99Yt1lZbbHFviXg6Bw5BZHNnCSPRsO0i/VwYtE/itikFsF6hOnidw0WajMXdhv3oePhK4Luwo/V19/TN3JJ+i1NgdOLNjQ1n1dGE2edpEq7gowYovH+3c3q/SC0HfQUl7Q6N1Dd9qftP50+xLJETptaSQIsuTpu3MPMS2aJzm2tXWnpm6rxgw5SGpm3nVLuec+3s/hlxeLC5Dl7LOkBOSOWBJWIXouIVpBXBN+78xKvnhwFsbYepGP1xIJCjopUwfdWY2p4aXkb2N4TgFBZHzHU72dA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QKe6F1fjLbJNFrLny9J5xQHZPyAXy6qLfxPKP1BNHQNFnYlvK4Ic8VfOu9BBXkjeFgz4RqvRxHwGVB9gWWm2j9TpxrfwQEXRIyfFWB5/4/MTvmBXug0A9Sye8AGxMd/xQ5OmEntIufOYezyYd6jUCKsF1o3uYoyUDcWPEDli3Zh46B4GGGDKYYlRuiMyFM1+p4PDaBBRhyCJw6CTa8Sq5n085tq/5V9Ubn/QnLSm0BgXnOcWhC3XMQ+weG5Y/1U68wXHR1KdQpHpQ9XpzqwVONh+6X+cE+3VCo2g39C5rAv3jI1fKnyIMHxY1fcXRLiXRsWfCY5lR7iavA589yarYQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Paul Durrant <paul@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 02 Dec 2021 08:47:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.
Jan
|