From: Leon Romanovsky <leon@kernel.org>
To: Wenpeng Liang <liangwenpeng@huawei.com>
Cc: dledford@redhat.com, jgg@nvidia.com, linux-rdma@vger.kernel.org,
linuxarm@huawei.com, Xi Wang <wangxi11@huawei.com>
Subject: Re: [PATCH v3 for-next 01/12] RDMA/hns: Introduce DCA for RC QP
Date: Tue, 27 Jul 2021 15:07:56 +0300 [thread overview]
Message-ID: <YP/3HPtB9DkFbWOL@unreal> (raw)
In-Reply-To: <1627356452-30564-2-git-send-email-liangwenpeng@huawei.com>
On Tue, Jul 27, 2021 at 11:27:21AM +0800, Wenpeng Liang wrote:
> From: Xi Wang <wangxi11@huawei.com>
>
> The hip09 introduces the DCA(Dynamic context attachment) feature which
> supports many RC QPs to share the WQE buffer in a memory pool, this will
> reduce the memory consumption when there are too many QPs are inactive.
>
> If a QP enables DCA feature, the WQE's buffer will not be allocated when
> creating. But when the users start to post WRs, the hns driver will
> allocate a buffer from the memory pool and then fill WQEs which tagged with
> this QP's number.
>
> The hns ROCEE will stop accessing the WQE buffer when the user polled all
> of the CQEs for a DCA QP, then the driver will recycle this WQE's buffer
> to the memory pool.
>
> This patch adds a group of methods to support the user space register
> buffers to a memory pool which belongs to the user context. The hns kernel
> driver will update the pages state in this pool when the user calling the
> post/poll methods and the user driver can get the QP's WQE buffer address
> by the key and offset which queried from kernel.
>
> Signed-off-by: Xi Wang <wangxi11@huawei.com>
> Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
> ---
> drivers/infiniband/hw/hns/Makefile | 2 +-
> drivers/infiniband/hw/hns/hns_roce_dca.c | 343 ++++++++++++++++++++++++++++
> drivers/infiniband/hw/hns/hns_roce_dca.h | 22 ++
> drivers/infiniband/hw/hns/hns_roce_device.h | 9 +
> drivers/infiniband/hw/hns/hns_roce_main.c | 27 ++-
> include/uapi/rdma/hns-abi.h | 27 +++
> 6 files changed, 427 insertions(+), 3 deletions(-)
> create mode 100644 drivers/infiniband/hw/hns/hns_roce_dca.c
> create mode 100644 drivers/infiniband/hw/hns/hns_roce_dca.h
<...>
> +static struct hns_dca_page_state *alloc_dca_states(void *pages, int count)
> +{
> + struct hns_dca_page_state *states;
> +
> + states = kcalloc(count, sizeof(*states), GFP_NOWAIT);
GFP_NOWAIT ????
Why do you use this flag while in the function before you used classic GFP_KERNEL?
Thanks
next prev parent reply other threads:[~2021-07-27 12:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 3:27 [PATCH v3 for-next 00/12] RDMA/hns: Add support for Dynamic Context Attachment Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 01/12] RDMA/hns: Introduce DCA for RC QP Wenpeng Liang
2021-07-27 12:07 ` Leon Romanovsky [this message]
2021-07-28 6:10 ` Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 02/12] RDMA/hns: Add method for shrinking DCA memory pool Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 03/12] RDMA/hns: Configure DCA mode for the userspace QP Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 04/12] RDMA/hns: Refactor QP modify flow Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 05/12] RDMA/hns: Add method for attaching WQE buffer Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 06/12] RDMA/hns: Setup the configuration of WQE addressing to QPC Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 07/12] RDMA/hns: Add method to detach WQE buffer Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 08/12] RDMA/hns: Add method to query WQE buffer's address Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 09/12] RDMA/hns: Add a shared memory to sync DCA status Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 10/12] RDMA/hns: Sync DCA status by the shared memory Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 11/12] RDMA/nldev: Add detailed CTX information support Wenpeng Liang
2021-07-27 3:27 ` [PATCH v3 for-next 12/12] RDMA/hns: Dump detailed driver-specific UCTX Wenpeng Liang
2021-07-27 11:57 ` Leon Romanovsky
2021-07-28 6:13 ` Wenpeng Liang
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=YP/3HPtB9DkFbWOL@unreal \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@nvidia.com \
--cc=liangwenpeng@huawei.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=wangxi11@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.