RDMA/hns: Create CQ with selected CQN for bank load balance
authorYangyang Li <liyangyang20@huawei.com>
Thu, 7 Jan 2021 08:36:29 +0000 (16:36 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 18 Jan 2021 20:10:32 +0000 (16:10 -0400)
commit1bbd4380744f637a759e0a7bb7d8d1c38282e0c3
tree48be6b48ff4864d82ca721df400978177b11b5dd
parent33eb12f2966ef9c529ce7138711a9c150a17931e
RDMA/hns: Create CQ with selected CQN for bank load balance

In order to improve performance by balancing the load between different
banks of cache, the CQC cache is desigend to choose one of 4 banks
according to lower 2 bits of CQN. The hns driver needs to count the number
of CQ on each bank and then assigns the CQ being created to the bank with
the minimum load first.

Link: https://lore.kernel.org/r/1610008589-35770-1-git-send-email-liweihang@huawei.com
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_cq.c
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_main.c