linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Shunsuke Mie <mie@igel.co.jp>
Cc: Christoph Hellwig <hch@infradead.org>,
	Zhu Yanjun <zyjzyj2000@gmail.com>,
	Christian K??nig <christian.koenig@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Doug Ledford <dledford@redhat.com>,
	Jianxin Xiong <jianxin.xiong@intel.com>,
	Leon Romanovsky <leon@kernel.org>,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	Damian Hobson-Garcia <dhobsong@igel.co.jp>,
	Takanari Hayama <taki@igel.co.jp>,
	Tomohito Esaki <etom@igel.co.jp>
Subject: Re: [RFC PATCH 1/3] RDMA/umem: Change for rdma devices has not dma device
Date: Wed, 8 Sep 2021 08:18:04 -0300	[thread overview]
Message-ID: <20210908111804.GX1200268@ziepe.ca> (raw)
In-Reply-To: <CANXvt5rCCBku7LpAG5TV7LxkQ1bZnB6ACybKxJnTrRA1LE8e6Q@mail.gmail.com>

On Wed, Sep 08, 2021 at 05:41:39PM +0900, Shunsuke Mie wrote:
> 2021年9月8日(水) 16:20 Christoph Hellwig <hch@infradead.org>:
> >
> > On Wed, Sep 08, 2021 at 04:01:14PM +0900, Shunsuke Mie wrote:
> > > Thank you for your comment.
> > > >
> > > > On Wed, Sep 08, 2021 at 03:16:09PM +0900, Shunsuke Mie wrote:
> > > > > To share memory space using dma-buf, a API of the dma-buf requires dma
> > > > > device, but devices such as rxe do not have a dma device. For those case,
> > > > > change to specify a device of struct ib instead of the dma device.
> > > >
> > > > So if dma-buf doesn't actually need a device to dma map why do we ever
> > > > pass the dma_device here?  Something does not add up.
> > > As described in the dma-buf api guide [1], the dma_device is used by dma-buf
> > > exporter to know the device buffer constraints of importer.
> > > [1] https://lwn.net/Articles/489703/
> >
> > Which means for rxe you'd also have to pass the one for the underlying
> > net device.
> I thought of that way too. In that case, the memory region is constrained by the
> net device, but rxe driver copies data using CPU. To avoid the constraints, I
> decided to use the ib device.

Well, that is the whole problem.

We can't mix the dmabuf stuff people are doing that doesn't fill in
the CPU pages in the SGL with RXE - it is simply impossible as things
currently are for RXE to acess this non-struct page memory.

Jason

  reply	other threads:[~2021-09-08 11:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  6:16 [RFC PATCH 0/3] RDMA/rxe: Add dma-buf support Shunsuke Mie
2021-09-08  6:16 ` [RFC PATCH 1/3] RDMA/umem: Change for rdma devices has not dma device Shunsuke Mie
2021-09-08  6:26   ` Christoph Hellwig
2021-09-08  7:01     ` Shunsuke Mie
2021-09-08  7:19       ` Christoph Hellwig
2021-09-08  8:41         ` Shunsuke Mie
2021-09-08 11:18           ` Jason Gunthorpe [this message]
2021-09-08 13:33             ` Christian König
2021-09-08 19:22               ` Daniel Vetter
2021-09-08 23:33                 ` Jason Gunthorpe
2021-09-09  9:26                   ` Daniel Vetter
2021-09-10  1:46                     ` Shunsuke Mie
2021-09-13 19:22                       ` Daniel Vetter
2021-09-14  7:11                         ` Shunsuke Mie
2021-09-14  9:38                           ` Daniel Vetter
2021-09-14 10:13                             ` Shunsuke Mie
2021-09-08  6:16 ` [RFC PATCH 2/3] RDMA/rxe: Extract a mapping process into a function Shunsuke Mie
2021-09-08  6:16 ` [RFC PATCH 3/3] RDMA/rxe: Support dma-buf as memory region Shunsuke Mie
2021-09-09  5:45 ` [RFC PATCH 0/3] RDMA/rxe: Add dma-buf support Zhu Yanjun
2021-09-10  2:00   ` Shunsuke Mie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210908111804.GX1200268@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dhobsong@igel.co.jp \
    --cc=dledford@redhat.com \
    --cc=etom@igel.co.jp \
    --cc=hch@infradead.org \
    --cc=jianxin.xiong@intel.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mie@igel.co.jp \
    --cc=taki@igel.co.jp \
    --cc=zyjzyj2000@gmail.com \
    --subject='Re: [RFC PATCH 1/3] RDMA/umem: Change for rdma devices has not dma device' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).