Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4181550pxv; Tue, 29 Jun 2021 00:36:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOd7koZnzT6SaxEvk2eJCBZ1aGx7XmLSJG8OK4aPrkZUGw3zvnkYsHPmQUl7J+1/oeQhKQ X-Received: by 2002:a17:907:2da6:: with SMTP id gt38mr27758945ejc.528.1624952192117; Tue, 29 Jun 2021 00:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624952192; cv=none; d=google.com; s=arc-20160816; b=y1JCF4FEPRwPqCnMHMQKJ4S0xf0Uva0f0pMqr8R7D4gDmdRAj2yGUO3U8a0ERGmHQI XqMx91yUMZaaiKkBkf510TqF9IGm3WWX4D4ZNA/piyN2vTEf9WjTyjub+Sr4ssUVenXS drxFT0C5Fv/EQzSbEtQW5FoEojNy7Dj7uKV25/S5EyXRXbrTXd/SgYxVlcgA7u8DBWd6 LR12VJ8osGExUTVNGAR8iHpDYPyOLIvnK0bUnLlp3ATXyGDeokJXpw2k4kEIpCdaI36t 3vSeJyWONP1LfNKAzQsTjacFikePzwjQcn6S6PWxqOgONr8biSpxFA89T20AoE9sJ9mF IMhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=X7aRa/ari9ndRrZW6yGfSw3dQvpOEYQN4vmyoY/ZeNU=; b=sd4ihhq7jQ1fTVJp5sPNlhVuNzfA4lxrahtxuk9ounG2Pikjbqa691IO/ngqRKeKR9 ROn8TEF6DwYl0GNtM66+XhNp10cAP1poLMLGgz4Ko/jFoiAoP6xQrBfuHo9IJHn+KHK/ R+6Tn09PpFoIMmVK3vYzrt87aoRiobspZ9WnzCY45ToK17aWcFucoC8gc9/onaUnR4Da Rro1OudwGfbIHcgj/+5qIZH0TmCxN5Feh3kVInQ23lhgIqwhCwulZoZhviqM9TYLWvW+ c5m08+garOPijP84lKf1QOVIyqI+8N67XOTDClXuHaJmFIakc/d2ycEy/eRQGo7XAahQ xlQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QDgeywfx; 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 v22si15686574eji.478.2021.06.29.00.36.07; Tue, 29 Jun 2021 00:36:32 -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=QDgeywfx; 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 S232315AbhF2Hgb (ORCPT + 99 others); Tue, 29 Jun 2021 03:36:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21605 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232301AbhF2Hga (ORCPT ); Tue, 29 Jun 2021 03:36:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624952042; 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=X7aRa/ari9ndRrZW6yGfSw3dQvpOEYQN4vmyoY/ZeNU=; b=QDgeywfxmxZQEo7IQCYNxePBlSYwC86akw8fgAgO/QLSDydrDl2sqmap5r/QOLm97tjKTA T8xcDv1m+hsijuTv9FQpWP5yQqNGNAwvXE77vE1nYKL1yrHPgYMGAChsipVyqPyaavNvU0 nX/PIZXaxUNcZNzrdh8syfJGh1brgIc= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-366-A7gmfVNDPnC-cXzl0IpStw-1; Tue, 29 Jun 2021 03:34:01 -0400 X-MC-Unique: A7gmfVNDPnC-cXzl0IpStw-1 Received: by mail-pj1-f70.google.com with SMTP id g19-20020a17090adb13b029016f4a877b4fso1232399pjv.8 for ; Tue, 29 Jun 2021 00:34:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=X7aRa/ari9ndRrZW6yGfSw3dQvpOEYQN4vmyoY/ZeNU=; b=RqhRmAKnAaEXGCgEdqRszSm9pQFALSPp4MfxepbS3SmS5GYqSbmonGXnMQWDUYbnGL GbZEwfd3OP+JZ67XzB4hHcXzag9W6Mpc4r9OI4lu1nv5SukBLReNCVIpBJIS4pD/nDQa tQaxtv5HVRg6qOGy+Ul91WtohT5MW2KPKimKZU+GpADH4Fo6EysfrbB7vj1lZ5m+BpTO aec6Xo1PGpfDUpMOQ8aEPHuaP/Z6k3m7EhYXtvTJTxEa+f4Oy9qlhBrKJqyeY+SwFB4z /heG/XMMjz01thWn3dAZC/36f6H/P0O2Ge2wuRZWspQrIhUNcixMuAbsg19waajF3Qxa 6q/g== X-Gm-Message-State: AOAM531Y6nZaVj27R66s9GIoBIpBHOi4Z6PBIDHC9f1WEvrL1g4n/t6G o2GiwnSX2TFAQIBBC8WkJ7l+1r5oHrEG2NSyWtDZrMczjUSRZpsWhf+mhJVPrbeHGJC7Ke7mAUG A3/7Tp2CVkkVxT5oIFad9EXMa X-Received: by 2002:a63:43c4:: with SMTP id q187mr12256857pga.172.1624952039965; Tue, 29 Jun 2021 00:33:59 -0700 (PDT) X-Received: by 2002:a63:43c4:: with SMTP id q187mr12256834pga.172.1624952039684; Tue, 29 Jun 2021 00:33:59 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id c2sm17127924pjv.10.2021.06.29.00.33.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Jun 2021 00:33:59 -0700 (PDT) Subject: Re: [PATCH v8 00/10] Introduce VDUSE - vDPA Device in Userspace To: Yongji Xie Cc: Yongji Xie , Liu Xiaodong , "Michael S. Tsirkin" , Stefan Hajnoczi , Stefano Garzarella , Parav Pandit , Christoph Hellwig , Christian Brauner , Randy Dunlap , Matthew Wilcox , Al Viro , Jens Axboe , bcrl@kvack.org, Jonathan Corbet , =?UTF-8?Q?Mika_Penttil=c3=a4?= , Dan Carpenter , joro@8bytes.org, Greg KH , kvm , netdev@vger.kernel.org, linux-kernel , virtualization , iommu@lists.linux-foundation.org, songmuchun@bytedance.com, linux-fsdevel@vger.kernel.org References: <20210615141331.407-1-xieyongji@bytedance.com> <20210628103309.GA205554@storage2.sh.intel.com> From: Jason Wang Message-ID: <90e30d9e-5709-2a0b-0449-858eea9dfec9@redhat.com> Date: Tue, 29 Jun 2021 15:33:49 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/6/29 下午2:40, Yongji Xie 写道: > On Tue, Jun 29, 2021 at 12:13 PM Jason Wang wrote: >> >> 在 2021/6/28 下午6:32, Yongji Xie 写道: >>>> The large barrier is bounce-buffer mapping: SPDK requires hugepages >>>> for NVMe over PCIe and RDMA, so take some preallcoated hugepages to >>>> map as bounce buffer is necessary. Or it's hard to avoid an extra >>>> memcpy from bounce-buffer to hugepage. >>>> If you can add an option to map hugepages as bounce-buffer, >>>> then SPDK could also be a potential user of vduse. >>>> >>> I think we can support registering user space memory for bounce-buffer >>> use like XDP does. But this needs to pin the pages, so I didn't >>> consider it in this initial version. >>> >> Note that userspace should be unaware of the existence of the bounce buffer. >> > If so, it might be hard to use umem. Because we can't use umem for > coherent mapping which needs physical address contiguous space. > > Thanks, > Yongji We probably can use umem for memory other than the virtqueue (still via mmap()). Thanks