Re: ibv_reg_mr and mmap'ed memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 26, 2018 at 04:55:29PM +0200, Jörn Schumacher wrote:
> Hi all,
> 
> I am trying to register an mmap'ed memory region as send buffer using
> ibv_reg_mr (via a libfabric call).
> 
> The address is a virtual address that has been mmap'ed from a kernel address
> in a custom kernel driver. The mapping uses remap_pfn_range:
> 
> 
>    vma->vm_flags |= VM_DONTEXPAND;
>    vma->vm_flags |= VM_DONTDUMP;
>    vma->vm_flags |= VM_LOCKED;
>    remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, size,
> vma->vm_page_prot)
> 
> 
> The ibv_reg_mr call fails with -22 (Invalid argument). The call succeeds if
> I replace the buffer with a simple malloc'ed buffer.
> 
> Why would this not work with mmap'ed memory? Is there a way of mmap'ing the
> kernel address to user space that would allow the memory registration?

mmap'd memory has to be comaptible with get_user_pages and
remap_pfn_range does not produce memory like that.

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux