Re: [PATCH rdma-next v1 2/6] RDMA/umem: Add API to find best driver supported page size in an MR

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

 



On 19-Feb-19 16:57, Shiraz Saleem wrote:
> This helper iterates through the SG list to find the best page size to use
> from a bitmap of HW supported page sizes. Drivers that support multiple
> page sizes, but not mixed pages in an MR can use this API.
> 
> Suggested-by: Jason Gunthorpe <jgg@xxxxxxxx>
> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx>
> Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx>

I've tested this patch comparing our existing efa_cont_pages() implementation vs
ib_umem_find_single_pg_size() running different test suites:

Supported page sizes are anything between 4k to 2G.
I'm using page shift to compare results of both functions (ilog2 the return
value of ib_umem_find_single_pg_size).

When huge pages are disabled, in many cases efa_cont_pages() returns page shift
of 13 where ib_umem_find_single_pg_size() returns 12. Didn't see a test where
ib_umem_find_single_pg_size() returns anything other than 12 (PAGE_SIZE).

When huge pages are enabled, most of the times both functions return the same
value (page shift 21/22) but in some cases efa_cont_pages() returns 21 and
ib_umem_find_single_pg_size() returns 22 which causes register MR verb to fail
due to invalid page address.

I simply ran the tests, did not have a chance to debug the issue but it looks
like there's an issue with either ib_umem_find_single_pg_size() or the way i
used it for EFA.



[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