Re: [PATCH rdma-next v3 09/11] RDMA/efa: Add EFA verbs implementation

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

 



On 14-Mar-19 17:49, Jason Gunthorpe wrote:> Every file offset 'key/cookie' has
zero in the lower PAGE_SHIFT
> bits, as mmap only works on page aligned offsets.
> 
> The xarray key should be the page number to access - converted from
> the offset by stripping the lower PAGE_SHIFT bits (done by vm_pgoff
> already) and masking the upper flag bit>
> So with the 64 bit offset argument you only have 52 bits to to work
> with.
> - 12 are zero for PAGE_SHIFT
> - 32 are the page number for the xarray key
> - N are padding
> - N are the flags at a fixed location in the 64 bit offset>
> Userspace rdma-core can always use a 64 bit file offset for mmap.
>

Makes sense.
>> I'll take a look into changing this into an xarray.
>> What did you mean by a cyclic allocating xarray? We can't reuse the keys as the
>> entries should be valid until application exit.
> 
> Use xa_alloc_cyclic

Thanks.



[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