All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: Jason Gunthorpe <jgg@mellanox.com>
Cc: Michael Guralnik <michaelgur@mellanox.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"leon@kernel.org" <leon@kernel.org>,
	"dledford@redhat.com" <dledford@redhat.com>
Subject: Re: [PATCH mlx5-next 1/9] RDMA/mlx5: Move asynchronous mkey creation to mlx5_ib
Date: Thu, 27 Feb 2020 20:42:13 +0000	[thread overview]
Message-ID: <7b0e0f4b76330558d83163bc6c83fb6867dbdde1.camel@mellanox.com> (raw)
In-Reply-To: <20200227200052.GR26318@mellanox.com>

On Thu, 2020-02-27 at 16:00 -0400, Jason Gunthorpe wrote:
> On Thu, Feb 27, 2020 at 07:41:24PM +0000, Saeed Mahameed wrote:
> > On Thu, 2020-02-27 at 14:33 +0200, Leon Romanovsky wrote:
> > > From: Michael Guralnik <michaelgur@mellanox.com>
> > > 
> > > As mlx5_ib is the only user of the mlx5_core_create_mkey_cb, move
> > > the
> > > logic inside mlx5_ib and cleanup the code in mlx5_core.
> > > 
> > 
> > I have a WIP series that is moving the whole mr.c to mlx5_ib.
> > https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/log/?h=topic/mr-relocate
> > 
> > 
> > > Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
> > > Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> > >  drivers/infiniband/hw/mlx5/mr.c              | 25
> > > ++++++++++++++++
> > >  drivers/net/ethernet/mellanox/mlx5/core/mr.c | 22 +++-----------
> > > ---
> > >  include/linux/mlx5/driver.h                  |  6 -----
> > >  3 files changed, 24 insertions(+), 29 deletions(-)
> > > 
> > > diff --git a/drivers/infiniband/hw/mlx5/mr.c
> > > b/drivers/infiniband/hw/mlx5/mr.c
> > > index 6fa0a83c19de..dea14477a676 100644
> > > +++ b/drivers/infiniband/hw/mlx5/mr.c
> > > @@ -79,6 +79,25 @@ static bool use_umr_mtt_update(struct
> > > mlx5_ib_mr
> > > *mr, u64 start, u64 length)
> > >  		length + (start & (MLX5_ADAPTER_PAGE_SIZE - 1));
> > >  }
> > >  
> > > +static int create_mkey_cb(struct mlx5_core_dev *dev, struct
> > > mlx5_ib_mr *mr,
> > > +			  struct mlx5_async_ctx *async_ctx, u32 *in,
> > > int inlen,
> > > +			  mlx5_async_cbk_t callback)
> > > +{
> > > +	void *mkc;
> > > +	u8 key;
> > > +
> > > +	spin_lock_irq(&dev->priv.mkey_lock);
> > > +	key = dev->priv.mkey_key++;
> > 
> > you know i don't like mlx5_ib sniffing around mlx5_core->priv .. 
> > 
> > this is handled correctly in my series, i can rebase it and make it
> > ready in a couple of days.. let me know if this will be good enough
> > for
> > you.
> 
> How about Michael just take the two relevant patches into this series
> 
> {IB,net}/mlx5: Setup mkey variant before mr create command invocation
> {IB,net}/mlx5: Assign mkey variant in mlx5_ib only
> 

Also, IB/mlx5: Replace spinlock protected write with atomic var

it is a good one :)

> And this partially moves toward your series. It will be more than a
> few days to rebase and check all the parts of your series I think.

Okay.

-Saeed.

  reply	other threads:[~2020-02-27 20:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 12:33 [PATCH rdma-next 0/9] MR cache fixes and refactoring Leon Romanovsky
2020-02-27 12:33 ` [PATCH mlx5-next 1/9] RDMA/mlx5: Move asynchronous mkey creation to mlx5_ib Leon Romanovsky
2020-02-27 19:41   ` Saeed Mahameed
2020-02-27 20:00     ` Jason Gunthorpe
2020-02-27 20:42       ` Saeed Mahameed [this message]
2020-02-27 12:33 ` [PATCH rdma-next 2/9] RDMA/mlx5: Rename the tracking variables for the MR cache Leon Romanovsky
2020-02-27 12:33 ` [PATCH rdma-next 3/9] RDMA/mlx5: Simplify how the MR cache bucket is located Leon Romanovsky
2020-02-27 12:33 ` [PATCH rdma-next 4/9] RDMA/mlx5: Always remove MRs from the cache before destroying them Leon Romanovsky
2020-02-27 12:33 ` [PATCH rdma-next 5/9] RDMA/mlx5: Fix MR cache size and limit debugfs Leon Romanovsky
2020-02-27 12:33 ` [PATCH rdma-next 6/9] RDMA/mlx5: Lock access to ent->available_mrs/limit when doing queue_work Leon Romanovsky
2020-02-27 12:33 ` [PATCH rdma-next 7/9] RDMA/mlx5: Fix locking in MR cache work queue Leon Romanovsky
2020-02-27 12:33 ` [PATCH rdma-next 8/9] RDMA/mlx5: Revise how the hysteresis scheme works for cache filling Leon Romanovsky
2020-02-27 12:34 ` [PATCH rdma-next 9/9] RDMA/mlx5: Allow MRs to be created in the cache synchronously 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=7b0e0f4b76330558d83163bc6c83fb6867dbdde1.camel@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michaelgur@mellanox.com \
    --cc=netdev@vger.kernel.org \
    /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.