]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx5: Fix MR npages calculation for IB_ACCESS_HUGETLB
authorJason Gunthorpe <jgg@mellanox.com>
Thu, 15 Aug 2019 08:38:30 +0000 (11:38 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 20 Aug 2019 17:44:43 +0000 (13:44 -0400)
commitb9b9c539133e888708df4e271cc1bf9521ad6d9f
tree4cf696cda214d8fae2e1afb8e5d9d410f0b65ffe
parent75eaf80f84ebc7588c50189fc3b72bcd0f66e5fc
RDMA/mlx5: Fix MR npages calculation for IB_ACCESS_HUGETLB

When ODP is enabled with IB_ACCESS_HUGETLB then the required pages
should be calculated based on the extent of the MR, which is rounded
to the nearest huge page alignment.

Fixes: 74627516f55c ("RDMA/umem: Move page_shift from ib_umem to ib_odp_umem")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Link: https://lore.kernel.org/r/20190815083834.9245-5-leon@kernel.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/umem.c
drivers/infiniband/hw/mlx5/mem.c