From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>, Shay Drory <shayd@nvidia.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next] RDMA/restrack: Delay QP deletion till all users are gone
Date: Mon, 26 Apr 2021 10:11:07 -0300 [thread overview]
Message-ID: <20210426131107.GR1370958@nvidia.com> (raw)
In-Reply-To: <YIa7WtlYono4wP5T@unreal>
On Mon, Apr 26, 2021 at 04:08:42PM +0300, Leon Romanovsky wrote:
> On Mon, Apr 26, 2021 at 09:03:49AM -0300, Jason Gunthorpe wrote:
> > On Sun, Apr 25, 2021 at 08:38:57PM +0300, Leon Romanovsky wrote:
> > > On Sun, Apr 25, 2021 at 02:22:54PM -0300, Jason Gunthorpe wrote:
> > > > On Sun, Apr 25, 2021 at 04:44:55PM +0300, Leon Romanovsky wrote:
> > > > > > > The proposed prepare/abort/finish flow is much harder to implement correctly.
> > > > > > > Let's take as an example ib_destroy_qp_user(), we called to rdma_rw_cleanup_mrs(),
> > > > > > > but didn't restore them after .destroy_qp() failure.
> > > > > >
> > > > > > I think it is a bug we call rdma_rw code in a a user path.
> > > > >
> > > > > It was an example of a flow that wasn't restored properly.
> > > > > The same goes for ib_dealloc_pd_user(), release of __internal_mr.
> > > > >
> > > > > Of course, these flows shouldn't fail because of being kernel flows, but it is not clear
> > > > > from the code.
> > > >
> > > > Well, exactly, user flows are not allowed to do extra stuff before
> > > > calling the driver destroy
> > > >
> > > > So the arrangement I gave is reasonable and make sense, it is
> > > > certainly better than the hodge podge of ordering that we have today
> > >
> > > I thought about simpler solution - move rdma_restrack_del() before .destroy()
> > > callbacks together with attempt to readd res object if destroy fails.
> >
> > Is isn't simpler, now add can fail and can't be recovered
>
> It is not different from failure during first call to rdma_restrack_add().
> You didn't like the idea to be strict with addition of restrack, but
> want to be strict in reinsert.
It is ugly we couldn't fix the add side, lets not repeat that uglyness
in other places
Jason
next prev parent reply other threads:[~2021-04-26 13:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-18 13:37 [PATCH rdma-next] RDMA/restrack: Delay QP deletion till all users are gone Leon Romanovsky
2021-04-20 12:39 ` Jason Gunthorpe
2021-04-20 13:06 ` Leon Romanovsky
2021-04-20 15:25 ` Jason Gunthorpe
2021-04-21 5:03 ` Leon Romanovsky
2021-04-22 14:29 ` Jason Gunthorpe
2021-04-25 13:03 ` Leon Romanovsky
2021-04-25 13:08 ` Jason Gunthorpe
2021-04-25 13:44 ` Leon Romanovsky
2021-04-25 17:22 ` Jason Gunthorpe
2021-04-25 17:38 ` Leon Romanovsky
2021-04-26 12:03 ` Jason Gunthorpe
2021-04-26 13:08 ` Leon Romanovsky
2021-04-26 13:11 ` Jason Gunthorpe [this message]
2021-04-27 4:45 ` Leon Romanovsky
2021-05-02 11:28 ` 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=20210426131107.GR1370958@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=shayd@nvidia.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).