From: Jason Gunthorpe <jgg@nvidia.com>
To: Weihang Li <liweihang@huawei.com>
Cc: <dledford@redhat.com>, <leon@kernel.org>,
<linux-rdma@vger.kernel.org>, <linuxarm@openeuler.org>
Subject: Re: [PATCH for-rc] RDMA/hns: Use mutex instead of spinlock for ida allocation
Date: Tue, 19 Jan 2021 20:25:37 -0400 [thread overview]
Message-ID: <20210120002537.GB963641@nvidia.com> (raw)
In-Reply-To: <1611048513-28663-1-git-send-email-liweihang@huawei.com>
On Tue, Jan 19, 2021 at 05:28:33PM +0800, Weihang Li wrote:
> From: Yangyang Li <liyangyang20@huawei.com>
>
> GFP_KERNEL may cause ida_alloc_range() to sleep, but the spinlock covering
> this function is not allowed to sleep, so the spinlock needs to be changed
> to mutex.
>
> As there is a certain chance of memory allocation failure, GFP_ATOMIC
> is not suitable for QP allocation scenarios.
>
> Fixes: 71586dd20010 ("RDMA/hns: Create QP with selected QPN for bank load balance")
> Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
> Signed-off-by: Weihang Li <liweihang@huawei.com>
> ---
> drivers/infiniband/hw/hns/hns_roce_device.h | 2 +-
> drivers/infiniband/hw/hns/hns_roce_qp.c | 11 ++++++-----
> 2 files changed, 7 insertions(+), 6 deletions(-)
Applied to for-rc, thanks
Jason
prev parent reply other threads:[~2021-01-20 0:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 9:28 [PATCH for-rc] RDMA/hns: Use mutex instead of spinlock for ida allocation Weihang Li
2021-01-20 0:25 ` Jason Gunthorpe [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=20210120002537.GB963641@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@openeuler.org \
--cc=liweihang@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.