From: Leon Romanovsky <leon@kernel.org>
To: Shunsuke Mie <mie@igel.co.jp>
Cc: linux-rdma@vger.kernel.org, Takanari Hayama <taki@igel.co.jp>
Subject: Re: [RFC] RDMA with Continuous Memory Allocator
Date: Tue, 13 Jul 2021 08:18:06 +0300 [thread overview]
Message-ID: <YO0iDpxD2pJYV3t+@unreal> (raw)
In-Reply-To: <CANXvt5oKHQFcKm5ypgS1FyMm_K9KntpmDVHDQRH3fsKXOXoc5A@mail.gmail.com>
On Fri, Jul 09, 2021 at 07:24:48PM +0900, Shunsuke Mie wrote:
> Hi all,
>
> I tried to use Continuous Memory Allocator (CMA) allocated memory for
> RDMA transfer buffer in userspace, but it failed.
Sorry for my question, but why do you need it?
From that I remember, CMA memory is used for the devices that doesn't
support scatter-gather, while RDMA devices (umem) need SG.
Thanks
>
> For more details, an ibv_reg_mr() API fails when I pass an mmaped
> memory region of allocated memory by the CMA. The reason why, a CMA
> mmap function, __dma_mmap_from_coherent(), sets VM_IO and VM_PFNMAP
> to vma->vm_flags, and an ib_uverbs_reg_mr(), kernel function
> corresponding to the ibv_reg_mr(), tries to pin the memory region but,
> it becomes to fail. because VM_IO or VM_PFNMAP regions cannot be
> pined. As a result, the ibv_reg_mr() returns an error.
>
> I think the ib_umem_get() that is called in the ib_uverbs_reg_mr() and
> pins memories needs some modifications to support RDMA transfer
> to/from the CMA memory.
>
> I’d like to know your comments, ideas, and other solution.
>
> Thanks a lot,
> Shunsuke.
next prev parent reply other threads:[~2021-07-13 5:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-09 10:24 [RFC] RDMA with Continuous Memory Allocator Shunsuke Mie
2021-07-13 5:18 ` Leon Romanovsky [this message]
2021-07-13 6:57 ` Shunsuke Mie
2021-07-13 8:30 ` Leon Romanovsky
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=YO0iDpxD2pJYV3t+@unreal \
--to=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mie@igel.co.jp \
--cc=taki@igel.co.jp \
/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