From: Jason Gunthorpe <jgg@mellanox.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Maor Gottlieb <maorg@mellanox.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next 2/2] RDMA/core: Optimize XRC target lookup
Date: Mon, 22 Jun 2020 09:29:10 -0300 [thread overview]
Message-ID: <20200622122910.GB2590509@mellanox.com> (raw)
In-Reply-To: <20200621104110.53509-3-leon@kernel.org>
On Sun, Jun 21, 2020 at 01:41:10PM +0300, Leon Romanovsky wrote:
> @@ -2318,19 +2313,18 @@ EXPORT_SYMBOL(ib_alloc_xrcd_user);
>
> int ib_dealloc_xrcd_user(struct ib_xrcd *xrcd, struct ib_udata *udata)
> {
> + unsigned long index;
> struct ib_qp *qp;
> int ret;
>
> if (atomic_read(&xrcd->usecnt))
> return -EBUSY;
>
> - while (!list_empty(&xrcd->tgt_qp_list)) {
> - qp = list_entry(xrcd->tgt_qp_list.next, struct ib_qp, xrcd_list);
> + xa_for_each(&xrcd->tgt_qps, index, qp) {
> ret = ib_destroy_qp(qp);
> if (ret)
> return ret;
> }
Why doesn't this need to hold the tgt_qps_rwsem?
Jason
next prev parent reply other threads:[~2020-06-22 12:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-21 10:41 [PATCH rdma-next 0/2] Convert XRC to use xarray Leon Romanovsky
2020-06-21 10:41 ` [PATCH rdma-next 1/2] RDMA: Clean ib_alloc_xrcd() and reuse it to allocate XRC domain Leon Romanovsky
2020-06-21 10:41 ` [PATCH rdma-next 2/2] RDMA/core: Optimize XRC target lookup Leon Romanovsky
[not found] ` <CAD+HZHUnW53ni=16=XL6hY1AHoNtsa88_V5P+XOHb55Fm83zZQ@mail.gmail.com>
2020-06-21 14:41 ` Maor Gottlieb
2020-06-22 12:29 ` Jason Gunthorpe [this message]
2020-06-22 12:57 ` Maor Gottlieb
2020-06-22 13:05 ` Jason Gunthorpe
2020-06-22 13:39 ` Leon Romanovsky
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=20200622122910.GB2590509@mellanox.com \
--to=jgg@mellanox.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@mellanox.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;
as well as URLs for NNTP newsgroup(s).