Re: RDMA Read: Local protection error

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

 



> On May 26, 2016, at 12:30 PM, Bart Van Assche <bart.vanassche@xxxxxxxxxxx> wrote:
> 
> On 05/26/2016 09:24 AM, Yishai Hadas wrote:
>> On 5/25/2016 6:58 PM, Chuck Lever wrote:
>>> When debugging is disabled, kzalloc returns page-aligned
>>> addresses:
>> 
>> Is it defined some where that regular kzalloc/kmalloc guaranties to
>> return a page-aligned address as you see in your testing ? if so the
>> debug mode should behave the same. Otherwise we can consider using any
>> flag allocation that can force that if such exists.
>> Let's get other people's input here.
> 
> My understanding is that the fact that k[mz]alloc() returns a page-aligned buffer if the allocation size is > PAGE_SIZE / 2 is a side effect of the implementation and not something callers of that function should rely on. I think the only assumption k[mz]alloc() callers should rely on is that the allocated memory respects ARCH_KMALLOC_MINALIGN.

I agree. mlx4_alloc_priv_pages() is carefully designed to
correct the alignment of the buffer, so it already assumes
that it is not getting a page-aligned buffer.

The alignment isn't the problem here, though. It's that
the buffer contains a page-boundary. That is guaranteed
to be the case for HCAs that support more than 512
sges, so that will have to be addressed (at least in
mlx5).


--
Chuck Lever



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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