public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: <dledford@redhat.com>, <linux-rdma@vger.kernel.org>,
	<lijun_nudt@163.com>, <oulijun@huawei.com>,
	<charles.chenxin@huawei.com>, <liuyixian@huawei.com>,
	<shaobo.xu@intel.com>, <zhangxiping3@huawei.com>,
	<xavier.huwei@tom.com>, <linuxarm@huawei.com>,
	<linux-kernel@vger.kernel.org>, <shaobohsu@163.com>,
	<shaoboxu@tom.com>
Subject: Re: [PATCH for-next 3/4] RDMA/hns: Update the IRRL table chunk size in hip08
Date: Tue, 17 Oct 2017 19:40:38 +0800	[thread overview]
Message-ID: <59E5EC36.90207@huawei.com> (raw)
In-Reply-To: <20171001054037.GB2031@mtr-leonro.local>



On 2017/10/1 13:40, Leon Romanovsky wrote:
> On Sat, Sep 30, 2017 at 05:29:00PM +0800, Wei Hu (Xavier) wrote:
>> As the increase of the IRRL specification in hip08, the IRRL table
>> chunk size needs to be updated.
>> This patch updates the IRRL table chunk size to 256k for hip08.
>>
>> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>> Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
>> Signed-off-by: Lijun Ou <oulijun@huawei.com>
>> ---
>>   drivers/infiniband/hw/hns/hns_roce_device.h |  3 +++
>>   drivers/infiniband/hw/hns/hns_roce_hem.c    | 31 ++++++++++++++---------------
>>   drivers/infiniband/hw/hns/hns_roce_hw_v1.c  |  1 +
>>   drivers/infiniband/hw/hns/hns_roce_hw_v1.h  |  2 ++
>>   drivers/infiniband/hw/hns/hns_roce_hw_v2.c  |  1 +
>>   drivers/infiniband/hw/hns/hns_roce_hw_v2.h  |  2 ++
>>   6 files changed, 24 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h
>> index 9353400..fc2a53d 100644
>> --- a/drivers/infiniband/hw/hns/hns_roce_device.h
>> +++ b/drivers/infiniband/hw/hns/hns_roce_device.h
>> @@ -236,6 +236,8 @@ struct hns_roce_hem_table {
>>   	unsigned long	num_obj;
>>   	/*Single obj size */
>>   	unsigned long	obj_size;
>> +	unsigned long	table_chunk_size;
>> +	unsigned long	hem_alloc_size;
>>   	int		lowmem;
>>   	struct mutex	mutex;
>>   	struct hns_roce_hem **hem;
>> @@ -565,6 +567,7 @@ struct hns_roce_caps {
>>   	u32		cqe_ba_pg_sz;
>>   	u32		cqe_buf_pg_sz;
>>   	u32		cqe_hop_num;
>> +	u32		chunk_sz;	/* chunk size in non multihop mode*/
>>   };
> Hi,
>
> I have two comments:
> 1. In this code table_chunk_size is equal and similar to hem_alloc_size.
> Please don't introduce unneeded complexity.
Hi, Leon
     ok, we will delete hem_alloc_size.
Thanks.
> 2. The size of table is num_obj * obj_size, there is no need to
> table_chunk_size and hem_alloc_size at all. There are plenty of macros in
> the kernel to deal with the tables.
Hi, Leon
     chunk size is limited by the hardware and is max access capactiy by 
hardware in hip06 and hip08 SoC.
     For exmple, chunk size is 128K in hip06 and 256K in hip08.
Thanks
> Thanks

  reply	other threads:[~2017-10-17 11:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-30  9:28 [PATCH for-next 0/4] Add Features & Code improvements for hip08 Wei Hu (Xavier)
2017-09-30  9:28 ` [PATCH for-next 1/4] RDMA/hns: Support WQE/CQE/PBL page size configurable feature in hip08 Wei Hu (Xavier)
2017-09-30  9:28 ` [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support " Wei Hu (Xavier)
2017-09-30 16:10   ` Leon Romanovsky
2017-10-12 12:31     ` Wei Hu (Xavier)
2017-10-12 12:59       ` Robin Murphy
2017-11-01  7:46         ` Wei Hu (Xavier)
2017-11-01 12:26           ` Robin Murphy
2017-11-07  2:45             ` Wei Hu (Xavier)
2017-11-07  6:32               ` Leon Romanovsky
2017-11-09  1:17                 ` Wei Hu (Xavier)
2017-11-07 15:48               ` Jason Gunthorpe
2017-11-07 15:58                 ` Christoph Hellwig
2017-11-07 16:03                   ` Jason Gunthorpe
2017-11-09  1:26                   ` Wei Hu (Xavier)
2017-11-09  1:30                 ` Wei Hu (Xavier)
2017-11-09  1:36             ` Wei Hu (Xavier)
2017-10-12 14:54       ` Leon Romanovsky
2017-10-18  8:42     ` Wei Hu (Xavier)
2017-10-18  9:12       ` Wei Hu (Xavier)
2017-10-18 14:23         ` Leon Romanovsky
2017-09-30  9:29 ` [PATCH for-next 3/4] RDMA/hns: Update the IRRL table chunk size " Wei Hu (Xavier)
2017-10-01  5:40   ` Leon Romanovsky
2017-10-17 11:40     ` Wei Hu (Xavier) [this message]
2017-09-30  9:29 ` [PATCH for-next 4/4] RDMA/hns: Update the PD&CQE&MTT specification " Wei Hu (Xavier)

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=59E5EC36.90207@huawei.com \
    --to=xavier.huwei@huawei.com \
    --cc=charles.chenxin@huawei.com \
    --cc=dledford@redhat.com \
    --cc=leon@kernel.org \
    --cc=lijun_nudt@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liuyixian@huawei.com \
    --cc=oulijun@huawei.com \
    --cc=shaobo.xu@intel.com \
    --cc=shaobohsu@163.com \
    --cc=shaoboxu@tom.com \
    --cc=xavier.huwei@tom.com \
    --cc=zhangxiping3@huawei.com \
    /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