OSDN Git Service

RDMA/umem: Use simpler logic for ib_umem_find_best_pgsz()
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 4 Sep 2020 22:41:44 +0000 (19:41 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 9 Sep 2020 18:33:17 +0000 (15:33 -0300)
commit3361c29e9279e682c0e9a7d7461b4e3bbc77830b
treea4c62c20f951a7cb9f009b0716f25d74b5f4fe81
parent10c75ccb54e4fe548cb16d7ed426d7d709e6ae76
RDMA/umem: Use simpler logic for ib_umem_find_best_pgsz()

The calculation in rdma_find_pg_bit() is fairly complicated, and the
function is never called anywhere else. Inline a simpler version into
ib_umem_find_best_pgsz()

Link: https://lore.kernel.org/r/3-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/umem.c
include/rdma/ib_verbs.h