Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp2510439pxy; Sat, 24 Apr 2021 18:46:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdP0w79VOCGsM9s7UJlSOSr5yDUXEcls1NsyHBlAje4cCF95gy/D3ksOjp3659CgNwkd3t X-Received: by 2002:a05:6402:cb3:: with SMTP id cn19mr12950765edb.206.1619315211009; Sat, 24 Apr 2021 18:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619315211; cv=none; d=google.com; s=arc-20160816; b=TjCbaWY4feJ2n+b4O7H51itdo1AgQFg65VKs8qe7MrL19OFvtM49wJupU/YYNl6ofF G53EE/0oR1DV8OJv6O+6udVcdO0FkP/eZfsghQ22vEaiLsXoL4CezvtmevpjnYXWuBeD a8E32S1k6DRp/yRfuCWOKvagX9uf30n8iuPRngVnmBS2hB8ntkHQt7m1udPxpwZqpTr9 IigGAZGRdG3gyGtB5hB4x4BEX0O0hHc9+S15tu6HoBYuYHcW49SvrrmPhYr9yM70UlEJ En7qDANJJVEWKXDjtOh265Hepv1YaaGCcFlIYcd+1hCVvsUmmU29tmQ/01did1AE0deA TpKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature; bh=X9SNeh6gyW1M84fzI5vwpJh2K2IpIi8tzyiDHoQ9A5k=; b=co4HfiNPkkL+zfGLggTangyTCnLy/JjfPAds2CaRFaC6T9KJqaS6TIJP9ssWCbhrqS tBefTbFZ/u3oz0HzUTJpHDUT0vMdPJwqKZy+bR+Jc5FIAIFU1mlasyOlBD6T1xT87KxD WGJGJ5mD3IJJseK2C9ufLTcfw/MNurpszQLe+XYC6oSM3oVeo+CYK3+FRaPBIzwxwKF6 iq5bId6r1exzuGTN0wZ3E9GL5aQ6fBPelfug9puvSUTBLnKAb+uqBBAbJEW05WqAydxy mFDACD47QYE8DQD6jGXR7sytfyBF0zW4B2ex1Rvu1GbWbUmatMejDOvdt4ZW0NSOA0HA vmXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YGJA+3Ei; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr6si11027758ejb.153.2021.04.24.18.46.28; Sat, 24 Apr 2021 18:46:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YGJA+3Ei; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229778AbhDYBoR (ORCPT + 99 others); Sat, 24 Apr 2021 21:44:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:28257 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbhDYBoQ (ORCPT ); Sat, 24 Apr 2021 21:44:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619315016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X9SNeh6gyW1M84fzI5vwpJh2K2IpIi8tzyiDHoQ9A5k=; b=YGJA+3EiAd5iGYhDgwZ0d62gBDUbpzxxuiFtf7XuNGoTVBzs5YyS/1i5Y8E0taNQvGK+xq 6ZoJNe+NCMnBkNfRgwIRZzk8NNQ1ldh3Qi4pnMJtzc7bD/qQKSPd5vQgH0q09sHPWijiYz MzhoMQrZX6exJcXmbuFaNV9ya6udXdU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-473-IO1z8ijeMsOJOjWuTu6gLw-1; Sat, 24 Apr 2021 21:43:34 -0400 X-MC-Unique: IO1z8ijeMsOJOjWuTu6gLw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 452968030B5; Sun, 25 Apr 2021 01:43:32 +0000 (UTC) Received: from wangxiaodeMacBook-Air.local (ovpn-13-44.pek2.redhat.com [10.72.13.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71BBB19C46; Sun, 25 Apr 2021 01:43:19 +0000 (UTC) Subject: Re: [RFC PATCH 0/7] Untrusted device support for virtio To: "Michael S. Tsirkin" Cc: Christoph Hellwig , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, xieyongji@bytedance.com, stefanha@redhat.com, file@sect.tu-berlin.de, ashish.kalra@amd.com, martin.radev@aisec.fraunhofer.de, konrad.wilk@oracle.com, kvm@vger.kernel.org References: <20210421032117.5177-1-jasowang@redhat.com> <20210422063128.GB4176641@infradead.org> <0c61dcbb-ac5b-9815-a4a1-5f93ae640011@redhat.com> <20210423161114-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <708f1a31-b4dd-d0b9-cb1e-e94b75a5a752@redhat.com> Date: Sun, 25 Apr 2021 09:43:17 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210423161114-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/4/24 上午4:14, Michael S. Tsirkin 写道: > On Thu, Apr 22, 2021 at 04:19:16PM +0800, Jason Wang wrote: >> 在 2021/4/22 下午2:31, Christoph Hellwig 写道: >>> On Wed, Apr 21, 2021 at 11:21:10AM +0800, Jason Wang wrote: >>>> The behaivor for non DMA API is kept for minimizing the performance >>>> impact. >>> NAK. Everyone should be using the DMA API in a modern world. So >>> treating the DMA API path worse than the broken legacy path does not >>> make any sense whatsoever. >> >> I think the goal is not treat DMA API path worse than legacy. The issue is >> that the management layer should guarantee that ACCESS_PLATFORM is set so >> DMA API is guaranteed to be used by the driver. So I'm not sure how much >> value we can gain from trying to 'fix' the legacy path. But I can change the >> behavior of legacy path to match DMA API path. >> >> Thanks > I think before we maintain different paths with/without ACCESS_PLATFORM > it's worth checking whether it's even a net gain. Avoiding sharing > by storing data in private memory can actually turn out to be > a net gain even without DMA API. I agree. > > It is worth checking what is the performance effect of this patch. So I've posted v2, where private memory is used in no DMA API path (as what has been done in packed). Pktgen and netperf doens't see obvious difference. Thanks > >