RDMA over PMEM

72 views
Skip to first unread message

S N

unread,
Oct 26, 2022, 6:52:37 PM10/26/22
to pmem
HI All,

I have a system with PMEM configured in fsdax mode. I wanted to do RDMA to the PMEM data. I use libibverbs for this. So I did mmap() to the file stored in PMEM and tried to register the virtual address with ibv_mr_reg(). I could not register virtual address returned by mmap(). 
It fails with Error Code 95 - Operation not supported

The same is tested with DRAM as well. But with DRAM everything works!!
I have mlx_5 Inifiniband hardware. From my research I found that in fsdax one should enable the ON DEMAND PAGING in the NIC. This was mentioned in the discussion https://groups.google.com/g/pmem/c/Qpq2PmETsKs/m/CW5CSfNLBAAJ

so I added the additional flag of IBV_ACCESS_ON_DEMAND in ibv_reg_mr() function.
Unfortunately, this did not help. The Error has changed from Error Code 95 to
Error Code 14 - Bad Address

Has anyone got the same experience with PMEM?
Any help or pointers would be greatly appreciated.

Thanks in advance!

~Kannoth


Dorau, Lukasz

unread,
Oct 27, 2022, 8:21:27 AM10/27/22
to S N, pmem

Hi,

 

Please build the librpma: https://github.com/pmem/rpma
and try to run all examples with your PMem device using the following command:

[rpma]$ ./examples/run-all-examples.sh ./build/examples/ /mnt/pmem/file

 

and please let me know if it works for you?

 

Łukasz

 

--
You received this message because you are subscribed to the Google Groups "pmem" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pmem+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pmem/e8ecb847-111b-487d-b3a8-323dcb6278a0n%40googlegroups.com.

Jeff Moyer

unread,
Oct 27, 2022, 12:01:09 PM10/27/22
to S N, pmem
S N <subash....@gmail.com> writes:

> HI All,
>
> I have a system with PMEM configured in fsdax mode. I wanted to do RDMA to
> the PMEM data. I use libibverbs for this. So I did mmap() to the file
> stored in PMEM and tried to register the virtual address with ibv_mr_reg().
> I could not register virtual address returned by mmap().
> It fails with Error Code 95 - Operation not supported

This is likely because you can't do RDMA to fsdax pages. Try using
device dax instead.

See this upstream commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2bb6d2837083de722bfdc369cb0d76ce188dd9b4

Cheers,
Jeff

S N

unread,
Oct 28, 2022, 10:30:50 AM10/28/22
to pmem
Hi Lukaz,

First of all, thanks for the response.
I ran the tests in the system  (pmdk installed) and all the tests are succeeded!! Attached the logs.
Now, what is missing libibverbs that is there in librpma in  memory region registration? 

Best Regards,
Subash
rdma_test_logs

S N

unread,
Oct 28, 2022, 10:35:44 AM10/28/22
to pmem
Hi Jeff,

Thank you for the response.
 I just did the tests with librpma as suggested by Lukasz and the tests are passing.!  Now I wonder, why doesn't it works with ibverbs? 

Best Regards,
Subash

Dorau, Lukasz

unread,
Oct 28, 2022, 5:02:42 PM10/28/22
to S N, pmem

Hi,

 

Librpma uses libibverbs (and librdmacm). Please compare and check what are you doing in a different way than librpma does? Or just share your code (at least the minimal reproducible example) with us.

 

Lukasz

 

Dorau, Lukasz

unread,
Oct 31, 2022, 4:34:31 AM10/31/22
to Dorau, Lukasz, S N, pmem

Hi,

 

You can compare what flags are passed to the mmap() and ibv_reg_mr() functions by your application and what by the librpma library (you can do it using a debugger by setting a breakpoint on these functions).

 

Do you pass to the ibv_reg_mr() function exactly the same pointer which you got from the mmap() function?

 

Lukasz

Reply all
Reply to author
Forward
0 new messages