From: Daniel Vetter <daniel@ffwll.ch>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Daniel Vetter <daniel@ffwll.ch>,
"Xiong, Jianxin" <jianxin.xiong@intel.com>,
Leon Romanovsky <leon@kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Doug Ledford <dledford@redhat.com>,
"Vetter, Daniel" <daniel.vetter@intel.com>,
Christian Koenig <christian.koenig@amd.com>
Subject: Re: [RFC PATCH v3 1/4] RDMA/umem: Support importing dma-buf as user memory region
Date: Tue, 6 Oct 2020 18:34:20 +0200 [thread overview]
Message-ID: <20201006163420.GB438822@phenom.ffwll.local> (raw)
In-Reply-To: <20201006154956.GI5177@ziepe.ca>
On Tue, Oct 06, 2020 at 12:49:56PM -0300, Jason Gunthorpe wrote:
> On Tue, Oct 06, 2020 at 11:22:14AM +0200, Daniel Vetter wrote:
> >
> > For reinstanting the pages you need:
> >
> > - dma_resv_lock, this prevents anyone else from issuing new moves or
> > anything like that
> > - dma_resv_get_excl + dma_fence_wait to wait for any pending moves to
> > finish. gpus generally don't wait on the cpu, but block the dependent
> > dma operations from being scheduled until that fence fired. But for rdma
> > odp I think you need the cpu wait in your worker here.
>
> Reinstating is not really any different that the first insertion, so
> then all this should be needed in every case?
Yes. Without move_notify we pin the dma-buf into system memory, so it
can't move, and hence you also don't have to chase it. But with
move_notify this all becomes possible.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2020-10-06 16:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-04 19:12 [RFC PATCH v3 0/4] RDMA: Add dma-buf support Jianxin Xiong
2020-10-04 19:12 ` [RFC PATCH v3 1/4] RDMA/umem: Support importing dma-buf as user memory region Jianxin Xiong
2020-10-05 10:54 ` Christian König
2020-10-05 16:19 ` Xiong, Jianxin
2020-10-05 13:13 ` Jason Gunthorpe
2020-10-05 16:18 ` Xiong, Jianxin
2020-10-05 16:33 ` Jason Gunthorpe
2020-10-05 19:41 ` Xiong, Jianxin
2020-10-06 9:22 ` Daniel Vetter
2020-10-06 15:26 ` Xiong, Jianxin
2020-10-06 15:49 ` Jason Gunthorpe
2020-10-06 16:34 ` Daniel Vetter [this message]
2020-10-06 17:24 ` Daniel Vetter
2020-10-06 18:02 ` Jason Gunthorpe
2020-10-06 18:17 ` Daniel Vetter
2020-10-06 18:38 ` Jason Gunthorpe
2020-10-06 19:12 ` Daniel Vetter
2020-10-07 7:13 ` Christian König
2020-10-06 16:40 ` Daniel Vetter
2020-10-04 19:12 ` [RFC PATCH v3 2/4] RDMA: Expand driver memory registration methods to support dma-buf Jianxin Xiong
2020-10-04 19:12 ` [RFC PATCH v3 3/4] RDMA/mlx5: Support dma-buf based userspace memory region Jianxin Xiong
2020-10-04 19:12 ` [RFC PATCH v3 4/4] RDMA/uverbs: Add uverbs command for dma-buf based MR registration Jianxin Xiong
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=20201006163420.GB438822@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=christian.koenig@amd.com \
--cc=daniel.vetter@intel.com \
--cc=dledford@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jgg@ziepe.ca \
--cc=jianxin.xiong@intel.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox