From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-next v13 6/6] RDMA/rxe: Convert mca read locking to RCU
Date: Wed, 23 Feb 2022 20:28:28 -0400 [thread overview]
Message-ID: <20220224002828.GC409228@nvidia.com> (raw)
In-Reply-To: <20220223230706.50332-7-rpearsonhpe@gmail.com>
On Wed, Feb 23, 2022 at 05:07:08PM -0600, Bob Pearson wrote:
> + /* schedule rxe_destroy_mca and then wait for
> + * completion before returning to rdma-core.
> + * Having an outstanding call_rcu() causes
> + * rdma-core to fail. It may be simpler to
> + * just call synchronize_rcu() and then
> + * rxe_destroy_rcu(), but this works OK.
> + */
> + call_rcu(&mca->rcu, rxe_destroy_mca);
> + wait_for_completion(&mca->complete);
What you've done here is just open code synchronize_rcu().
The trouble with synchronize_ruc() is rcu grace periods can take huge
amounts of time (>1s) on busy servers, so you really don't want to
write synchronize_rcu(), it might take minutes to close a verbs FD if
the user created lots of MCAs.
It is the dark side of RCU locking, you have to be able to work in the
call_rcu style async cleanup, or it doesn't really work.
Jason
next prev parent reply other threads:[~2022-02-24 0:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 23:07 [PATCH for-next v13 0/6] Move two object pools to rxe_mcast.c Bob Pearson
2022-02-23 23:07 ` [PATCH for-next v13 1/6] RDMA/rxe: Warn if mcast memory is not freed Bob Pearson
2022-02-23 23:07 ` [PATCH v13 for-next 2/6] RDMA/rxe: Collect mca init code in a subroutine Bob Pearson
2022-02-23 23:07 ` [PATCH for-next v13 3/6] RDMA/rxe: Collect cleanup mca " Bob Pearson
2022-02-23 23:07 ` [PATCH v13 for-next 4/6] RDMA/rxe: Cleanup rxe_mcast.c Bob Pearson
2022-02-23 23:07 ` [PATCH v13 for-next 5/6] RDMA/rxe: For mcast copy qp list to temp array Bob Pearson
2022-02-24 0:26 ` Jason Gunthorpe
2022-02-24 17:29 ` Bob Pearson
2022-02-23 23:07 ` [PATCH for-next v13 6/6] RDMA/rxe: Convert mca read locking to RCU Bob Pearson
2022-02-24 0:28 ` Jason Gunthorpe [this message]
2022-02-24 0:32 ` [PATCH for-next v13 0/6] Move two object pools to rxe_mcast.c Jason Gunthorpe
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=20220224002828.GC409228@nvidia.com \
--to=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=rpearsonhpe@gmail.com \
--cc=zyjzyj2000@gmail.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).