[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6e81f56a-0f95-248c-e88f-4190ca7f49a2@redhat.com>
Date: Thu, 24 Dec 2020 10:24:29 +0800
From: Jason Wang <jasowang@...hat.com>
To: Yongji Xie <xieyongji@...edance.com>
Cc: "Michael S. Tsirkin" <mst@...hat.com>,
Stefan Hajnoczi <stefanha@...hat.com>, sgarzare@...hat.com,
Parav Pandit <parav@...dia.com>, akpm@...ux-foundation.org,
Randy Dunlap <rdunlap@...radead.org>,
Matthew Wilcox <willy@...radead.org>, viro@...iv.linux.org.uk,
axboe@...nel.dk, bcrl@...ck.org, corbet@....net,
virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
kvm@...r.kernel.org, linux-aio@...ck.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC v2 00/13] Introduce VDUSE - vDPA Device in Userspace
On 2020/12/23 下午6:59, Yongji Xie wrote:
> On Wed, Dec 23, 2020 at 2:38 PM Jason Wang <jasowang@...hat.com> wrote:
>>
>> On 2020/12/22 下午10:52, Xie Yongji wrote:
>>> This series introduces a framework, which can be used to implement
>>> vDPA Devices in a userspace program. The work consist of two parts:
>>> control path forwarding and data path offloading.
>>>
>>> In the control path, the VDUSE driver will make use of message
>>> mechnism to forward the config operation from vdpa bus driver
>>> to userspace. Userspace can use read()/write() to receive/reply
>>> those control messages.
>>>
>>> In the data path, the core is mapping dma buffer into VDUSE
>>> daemon's address space, which can be implemented in different ways
>>> depending on the vdpa bus to which the vDPA device is attached.
>>>
>>> In virtio-vdpa case, we implements a MMU-based on-chip IOMMU driver with
>>> bounce-buffering mechanism to achieve that.
>>
>> Rethink about the bounce buffer stuffs. I wonder instead of using kernel
>> pages with mmap(), how about just use userspace pages like what vhost did?
>>
>> It means we need a worker to do bouncing but we don't need to care about
>> annoying stuffs like page reclaiming?
>>
> Now the I/O bouncing is done in the streaming DMA mapping routines
> which can be called from interrupt context. If we put this into a
> kworker, that means we need to synchronize with a kworker in an
> interrupt context. I think it can't work.
We just need to make sure the buffer is ready before the user is trying
to access them.
But I admit it would be tricky (require shadow virtqueue etc) which is
probably not a good idea.
Thanks
>
> Thanks,
> Yongji
>
Powered by blists - more mailing lists