Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: liweihang <liweihang@huawei.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: "dledford@redhat.com" <dledford@redhat.com>,
	"jgg@nvidia.com" <jgg@nvidia.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linuxarm@openeuler.org" <linuxarm@openeuler.org>
Subject: Re: [PATCH for-next] RDMA/hns: Create CQ with selected CQN for bank load balance
Date: Mon, 4 Jan 2021 07:41:16 +0000	[thread overview]
Message-ID: <cec4db14c2f94c5484324c8c3ad5af2d@huawei.com> (raw)
In-Reply-To: 20210104070616.GE31158@unreal

On 2021/1/4 15:06, Leon Romanovsky wrote:
> On Mon, Jan 04, 2021 at 02:35:15PM +0800, Weihang Li wrote:
>> From: Yangyang Li <liyangyang20@huawei.com>
>>
>> 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.
>>
>> Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
>> Signed-off-by: Weihang Li <liweihang@huawei.com>
>> ---
>>  drivers/infiniband/hw/hns/hns_roce_cq.c     | 114 +++++++++++++++++++++++-----
>>  drivers/infiniband/hw/hns/hns_roce_device.h |  10 ++-
>>  drivers/infiniband/hw/hns/hns_roce_main.c   |   8 +-
>>  3 files changed, 104 insertions(+), 28 deletions(-)
>>
>> diff --git a/drivers/infiniband/hw/hns/hns_roce_cq.c b/drivers/infiniband/hw/hns/hns_roce_cq.c
>> index 8533fc2..00350a3 100644
>> --- a/drivers/infiniband/hw/hns/hns_roce_cq.c
>> +++ b/drivers/infiniband/hw/hns/hns_roce_cq.c
>> @@ -38,11 +38,74 @@
>>  #include "hns_roce_hem.h"
>>  #include "hns_roce_common.h"
>>
> 
> <...>
> 
>> +	id = ida_alloc_range(&bank->ida, bank->min, bank->max, GFP_ATOMIC);
> 
> Do you create CQ in atomic context?
> It is probably GFP_KERNEL and not GFP_ATOMIC.
> 
> Thanks
> 

Hi Leon,

Thanks for your reminder, we should use GFP_KERNEL and the spin lock of banks
needs to be changed to mutex lock.

Weihang

      reply	other threads:[~2021-01-04  7:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04  6:35 [PATCH for-next] RDMA/hns: Create CQ with selected CQN for bank load balance Weihang Li
2021-01-04  7:06 ` Leon Romanovsky
2021-01-04  7:41   ` liweihang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cec4db14c2f94c5484324c8c3ad5af2d@huawei.com \
    --to=liweihang@huawei.com \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@openeuler.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox