IB/mlx5: Add contiguous ODP support
Currenlty ODP supports only regular MMU pages. Add ODP support for regions consisting of physically contiguous chunks of arbitrary order (huge pages for instance) to improve performance. Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Doug Ledford

vecāks
403cd12e2c
revīzija
b2ac91885b
@@ -61,13 +61,12 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr,
|
||||
int entry;
|
||||
unsigned long page_shift = umem->page_shift;
|
||||
|
||||
/* With ODP we must always match OS page size. */
|
||||
if (umem->odp_data) {
|
||||
*count = ib_umem_page_count(umem);
|
||||
*shift = PAGE_SHIFT;
|
||||
*ncont = *count;
|
||||
*ncont = ib_umem_page_count(umem);
|
||||
*count = *ncont << (page_shift - PAGE_SHIFT);
|
||||
*shift = page_shift;
|
||||
if (order)
|
||||
*order = ilog2(roundup_pow_of_two(*count));
|
||||
*order = ilog2(roundup_pow_of_two(*ncont));
|
||||
|
||||
return;
|
||||
}
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user