All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Thorsten Leemhuis <regressions@leemhuis.info>,
	Tony Lu <tonylu@linux.alibaba.com>,
	Maor Gottlieb <maorg@nvidia.com>, Alaa Hleihel <alaa@nvidia.com>,
	Chuck Lever <chuck.lever@oracle.com>,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-rc] RDMA/mlx5: Fix dereg mr flow for kernel MRs
Date: Mon, 3 Jan 2022 20:08:11 -0400	[thread overview]
Message-ID: <20220104000811.GA2596382@nvidia.com> (raw)
In-Reply-To: <YdM/0EUd3S4obWWa@unreal>

On Mon, Jan 03, 2022 at 08:26:24PM +0200, Leon Romanovsky wrote:

> The proposals are:
> 1. Return back to v1, which had dummy umem, so so DM memory regions will
> behave as regular user created verbs object.
> 2. Add extra flag to is_user/is_kernel for mlx5 mr struct and update all
> paths to rely on that flag.
> 3. Create separate dereg MR function that will treat DM differently.

It is not DM that is the problem, ti is that user and kernel has been
mixed together in this mess despite being completely different.

I've been slowly disentangling them and the series you just sent 'MR
cache enhancment' removes the last blocker from completely giving
kernel MRs their own struct.

So, the solution here is to move in the direction of making the kernel
MRs different. There is only one place that destroys a kernel MR, just
have it call a special 'destroy kernel MR' function that doesn't touch
any umem stuff at all. Remove the kernel-only parts entirely from the
current function.

After Aharon's series we can give them different types. Notice the
union is already completely disjoint except for the little bit
tracking the cache which evaporates once the cache only stores the
mkey # and not the struct memory.

Jason

  reply	other threads:[~2022-01-04  0:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21  9:46 [PATCH rdma-rc] RDMA/mlx5: Fix dereg mr flow for kernel MRs Leon Romanovsky
2021-12-22  2:51 ` Tony Lu
2022-01-03  9:51   ` Leon Romanovsky
2022-01-03 13:15     ` Thorsten Leemhuis
2022-01-03 18:26       ` Leon Romanovsky
2022-01-04  0:08         ` Jason Gunthorpe [this message]
2022-01-04 10:29         ` Thorsten Leemhuis

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=20220104000811.GA2596382@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=alaa@nvidia.com \
    --cc=chuck.lever@oracle.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@nvidia.com \
    --cc=regressions@leemhuis.info \
    --cc=tonylu@linux.alibaba.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 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.