From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBEE6C433DB for ; Mon, 28 Dec 2020 08:43:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 52817208B6 for ; Mon, 28 Dec 2020 08:43:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52817208B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8564F8D0009; Mon, 28 Dec 2020 03:43:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 805FC8D0003; Mon, 28 Dec 2020 03:43:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A5868D000A; Mon, 28 Dec 2020 03:43:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id 524938D0003 for ; Mon, 28 Dec 2020 03:43:46 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 10C1C3629 for ; Mon, 28 Dec 2020 08:43:46 +0000 (UTC) X-FDA: 77642052852.22.flame22_30096e827492 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id E1C0018038E68 for ; Mon, 28 Dec 2020 08:43:45 +0000 (UTC) X-HE-Tag: flame22_30096e827492 X-Filterd-Recvd-Size: 3991 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Dec 2020 08:43:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609145024; 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=b/mQcN8HBMjEvpA5cui1zWJDGM1GYmpavHlrRlsXqE4=; b=BHjOHyXqPdygAdIgXCxlEtCC4AfmlPs2v4wJqaDYdJJ/mAo0fyRDeaDFk2m5jBnHpaycWk L3UZtQg4BfxWTMWakupEPKpJ/LLniAhiRYMC+18wyRHCJ61MBEMf77OJnENHqBzY29EF3c pOpWKaHdmm1PfeeyjniWES9vXcSf/Eg= 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-517-fgpg1Q3MMjmXbi0k5uLn9w-1; Mon, 28 Dec 2020 03:43:40 -0500 X-MC-Unique: fgpg1Q3MMjmXbi0k5uLn9w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D532A800D53; Mon, 28 Dec 2020 08:43:37 +0000 (UTC) Received: from [10.72.13.159] (ovpn-13-159.pek2.redhat.com [10.72.13.159]) by smtp.corp.redhat.com (Postfix) with ESMTP id AEDAC704DA; Mon, 28 Dec 2020 08:43:19 +0000 (UTC) Subject: Re: [RFC v2 09/13] vduse: Add support for processing vhost iotlb message To: Yongji Xie Cc: "Michael S. Tsirkin" , Stefan Hajnoczi , sgarzare@redhat.com, Parav Pandit , akpm@linux-foundation.org, Randy Dunlap , Matthew Wilcox , viro@zeniv.linux.org.uk, axboe@kernel.dk, bcrl@kvack.org, corbet@lwn.net, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, kvm@vger.kernel.org, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org References: <20201222145221.711-1-xieyongji@bytedance.com> <20201222145221.711-10-xieyongji@bytedance.com> <6818a214-d587-4f0b-7de6-13c4e7e94ab6@redhat.com> <595fe7d6-7876-26e4-0b7c-1d63ca6d7a97@redhat.com> <0e6faf9c-117a-e23c-8d6d-488d0ec37412@redhat.com> <2b24398c-e6d9-14ec-2c0d-c303d528e377@redhat.com> From: Jason Wang Message-ID: Date: Mon, 28 Dec 2020 16:43:18 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2020/12/28 =E4=B8=8B=E5=8D=884:14, Yongji Xie wrote: >> I see. So all the above two questions are because VHOST_IOTLB_INVALIDA= TE >> is expected to be synchronous. This need to be solved by tweaking the >> current VDUSE API or we can re-visit to go with descriptors relaying f= irst. >> > Actually all vdpa related operations are synchronous in current > implementation. The ops.set_map/dma_map/dma_unmap should not return > until the VDUSE_UPDATE_IOTLB/VDUSE_INVALIDATE_IOTLB message is replied > by userspace. Could it solve this problem? =C2=A0I was thinking whether or not we need to generate IOTLB_INVALIDATE= =20 message to VDUSE during dma_unmap (vduse_dev_unmap_page). If we don't, we're probably fine. Thanks > > Thanks, > Yongji >