Re: [PATCH rdma-next 0/7] Use only a umem and HW page_shift to calculate MR sizes

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

 



On Mon, Oct 26, 2020 at 03:19:29PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxx>
> 
> >From Jason:
> 
> The MR code computes and passes around a tuple of (npages, page_shift,
> ncont, order) to represent the size of the MR in various terms.
> 
> This is quite confusing about what term refers to what, and overlaps with
> data already stored and computed inside the umem. Rework all of this to be
> more umem centric and use these identities instead:
> 
>       npages == ib_umem_num_pages(mr->umem)
>       page_shift == mr->page_shift
>       ncont == ib_umem_num_dma_blocks(mr->umem, 1 << mr->page_shift)
>       order == order_base_2(ncont)
> 
> By storing the page_shift inside the mlx5_ib_mr it becomes nearly self
> describing.
> 
> Thanks
> 
> Jason Gunthorpe (7):
>   RDMA/mlx5: Remove mlx5_ib_mr->order
>   RDMA/mlx5: Fix corruption of reg_pages in mlx5_ib_rereg_user_mr()
>   RDMA/mlx5: Remove mlx5_ib_mr->npages
>   RDMA/mlx5: Move mlx5_ib_cont_pages() to the creation of the mlx5_ib_mr
>   RDMA/mlx5: Remove order from mlx5_ib_cont_pages()
>   RDMA/mlx5: Remove ncont from mlx5_ib_cont_pages()
>   RDMA/mlx5: Remove npages from mlx5_ib_cont_pages()

Applied to for-next, thanks

Jason



[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