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, Maor Gottlieb <maorg@nvidia.com>
Subject: Re: [PATCH rdma-next 2/3] RDMA/mlx5: Create ODP EQ only when ODP MR is created
Date: Fri, 12 Mar 2021 09:03:31 -0400 [thread overview]
Message-ID: <20210312130331.GV2356281@nvidia.com> (raw)
In-Reply-To: <YEsL9z9DCw6EGYJ7@unreal>
On Fri, Mar 12, 2021 at 08:36:39AM +0200, Leon Romanovsky wrote:
> On Thu, Mar 11, 2021 at 08:07:39PM -0400, Jason Gunthorpe wrote:
> > On Thu, Mar 04, 2021 at 02:45:16PM +0200, Leon Romanovsky wrote:
> > > -static int
> > > -mlx5_ib_create_pf_eq(struct mlx5_ib_dev *dev, struct mlx5_ib_pf_eq *eq)
> > > +int mlx5r_odp_create_eq(struct mlx5_ib_dev *dev, struct mlx5_ib_pf_eq *eq)
> > > {
> > > struct mlx5_eq_param param = {};
> > > - int err;
> > > + int err = 0;
> > >
> > > + if (eq->core)
> > > + return 0;
> > > +
> > > + mutex_lock(&dev->odp_eq_mutex);
> >
> > The above if is locked wrong.
>
> It is not wrong, but this is optimization for the case that will be
> always.
It is wrong because there is no release/acquire on eq->core
Jason
next prev parent reply other threads:[~2021-03-12 13:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 12:45 [PATCH rdma-next 0/3] Batch independent fixes to mlx5_ib Leon Romanovsky
2021-03-04 12:45 ` [PATCH rdma-next 1/3] RDMA/mlx5: Fix query RoCE port Leon Romanovsky
2021-03-04 12:45 ` [PATCH rdma-next 2/3] RDMA/mlx5: Create ODP EQ only when ODP MR is created Leon Romanovsky
2021-03-12 0:07 ` Jason Gunthorpe
2021-03-12 6:36 ` Leon Romanovsky
2021-03-12 13:03 ` Jason Gunthorpe [this message]
2021-03-04 12:45 ` [PATCH rdma-next 3/3] RDMA/mlx5: Fix mlx5 rates to IB rates map Leon Romanovsky
2021-03-12 0:30 ` [PATCH rdma-next 0/3] Batch independent fixes to mlx5_ib Jason Gunthorpe
2021-03-12 6:37 ` 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=20210312130331.GV2356281@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@nvidia.com \
--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