public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Junxian Huang <huangjunxian6@hisilicon.com>
Cc: leon@kernel.org, linux-rdma@vger.kernel.org, linuxarm@huawei.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH for-next] RDMA/hns: Support flexible WQE buffer page size
Date: Tue, 30 Apr 2024 10:41:13 -0300	[thread overview]
Message-ID: <20240430134113.GU231144@ziepe.ca> (raw)
In-Reply-To: <20240430092845.4058786-1-huangjunxian6@hisilicon.com>

On Tue, Apr 30, 2024 at 05:28:45PM +0800, Junxian Huang wrote:
> From: Chengchang Tang <tangchengchang@huawei.com>
> 
> Currently, driver fixedly allocates 4K pages for userspace WQE buffer
> and results in HW reading WQE with a granularity of 4K even in a 64K
> system. HW has to switch pages every 4K, leading to a loss of performance.

> In order to improve performance, add support for userspace to allocate
> flexible WQE buffer page size between 4K to system PAGESIZE.
> @@ -90,7 +90,8 @@ struct hns_roce_ib_create_qp {
>  	__u8    log_sq_bb_count;
>  	__u8    log_sq_stride;
>  	__u8    sq_no_prefetch;
> -	__u8    reserved[5];
> +	__u8    pageshift;
> +	__u8    reserved[4];

It doesn't make any sense to pass in a pageshift from userspace.

Kernel should detect whatever underlying physical contiguity userspace
has been able to create and configure the hardware optimally. The umem
already has all the tools to do this trivially.

Why would you need to specify anything?

Jason

  reply	other threads:[~2024-04-30 13:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30  9:28 [PATCH for-next] RDMA/hns: Support flexible WQE buffer page size Junxian Huang
2024-04-30 13:41 ` Jason Gunthorpe [this message]
2024-05-06  6:47   ` Chengchang Tang
2024-05-06 15:11     ` Jason Gunthorpe
2024-05-07 14:21       ` Chengchang Tang
2024-05-07 16:32         ` Jason Gunthorpe
2024-05-07  9:22   ` Junxian Huang

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=20240430134113.GU231144@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=huangjunxian6@hisilicon.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@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