Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-26 Thread Jason Gunthorpe
eedesktop.org; Doug Ledford ; Vetter, > > Daniel ; Christian Koenig > > > > Subject: Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support > > > > On Wed, Nov 25, 2020 at 11:50:41AM +0100, Daniel Vetter wrote: > > > > > Yeah imo makes sense

Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-26 Thread Jason Gunthorpe
On Wed, Nov 25, 2020 at 11:50:41AM +0100, Daniel Vetter wrote: > Yeah imo makes sense. It's a bunch more code for you to make it work on > i915 and amd, but it's not terrible. And avoids the dependencies, and also > avoids the abuse of card* and dumb buffers. Plus not really more complex, > you ju

RE: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-25 Thread Xiong, Jianxin
an Koenig > Subject: Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support > > On Wed, Nov 25, 2020 at 07:27:07PM +, Xiong, Jianxin wrote: > > > From: Jason Gunthorpe > > > Sent: Wednesday, November 25, 2020 4:15 AM > > > To: Daniel Vetter

RE: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-25 Thread Xiong, Jianxin
Koenig > > Subject: Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support > > On Wed, Nov 25, 2020 at 11:50:41AM +0100, Daniel Vetter wrote: > > > Yeah imo makes sense. It's a bunch more code for you to make it work > > on > > i915 and amd, but it&#x

Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-25 Thread Daniel Vetter
ux-r...@vger.kernel.org; dri- > > de...@lists.freedesktop.org; Doug Ledford ; Vetter, > > Daniel ; Christian Koenig > > > > Subject: Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support > > > > On Mon, Nov 23, 2020 at 02:05:04PM -0400, Jason Gunthorpe wr

Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-25 Thread Jason Gunthorpe
On Tue, Nov 24, 2020 at 04:16:58PM +0100, Daniel Vetter wrote: > Compute is the worst, because opencl is widely considered a mistake (maybe > opencl 3 is better, but nvidia is stuck on 1.2). The actually used stuff is > cuda (nvidia-only), rocm (amd-only) and now with intel also playing we > have

RE: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-24 Thread Xiong, Jianxin
Koenig > > Subject: Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support > > On Mon, Nov 23, 2020 at 02:05:04PM -0400, Jason Gunthorpe wrote: > > On Mon, Nov 23, 2020 at 09:53:02AM -0800, Jianxin Xiong wrote: > > > > > +cdef

RE: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-24 Thread Xiong, Jianxin
Koenig > > Subject: Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support > > On Tue, Nov 24, 2020 at 04:16:58PM +0100, Daniel Vetter wrote: > > > Compute is the worst, because opencl is widely considered a mistake > > (maybe opencl 3 is better, but nvidia is

Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-24 Thread Daniel Vetter
On Mon, Nov 23, 2020 at 02:05:04PM -0400, Jason Gunthorpe wrote: > On Mon, Nov 23, 2020 at 09:53:02AM -0800, Jianxin Xiong wrote: > > > +cdef class DmaBuf: > > +def __init__(self, size, unit=0): > > +""" > > +Allocate DmaBuf object from a GPU device. This is done through the >

Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-24 Thread Jason Gunthorpe
On Mon, Nov 23, 2020 at 09:53:02AM -0800, Jianxin Xiong wrote: > +cdef class DmaBuf: > +def __init__(self, size, unit=0): > +""" > +Allocate DmaBuf object from a GPU device. This is done through the > +DRI device interface (/dev/dri/card*). Usually this requires the > +

RE: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-23 Thread Xiong, Jianxin
Daniel > > Subject: Re: [PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support > > On Mon, Nov 23, 2020 at 09:53:02AM -0800, Jianxin Xiong wrote: > > > +cdef class DmaBuf: > > +def __init__(self, size, unit=0): > > +""" > &g

[PATCH rdma-core 3/5] pyverbs: Add dma-buf based MR support

2020-11-23 Thread Jianxin Xiong
Define a new sub-class of 'MR' that uses dma-buf object for the memory region. Define a new class 'DmaBuf' for dma-buf object allocation. Signed-off-by: Jianxin Xiong --- pyverbs/CMakeLists.txt | 2 ++ pyverbs/dmabuf.pxd | 13 + pyverbs/dmabuf.pyx | 58 ++