From: Jason Gunthorpe <jgg@nvidia•com>
To: Leon Romanovsky <leon@kernel•org>
Cc: Doug Ledford <dledford@redhat•com>,
Yishai Hadas <yishaih@nvidia•com>,
Jakub Kicinski <kuba@kernel•org>, <linux-rdma@vger•kernel.org>,
<netdev@vger•kernel.org>, Saeed Mahameed <saeedm@nvidia•com>
Subject: Re: [PATCH mlx5-next v2] RDMA/mlx5: Cleanup the synchronize_srcu() from the ODP flow
Date: Mon, 8 Feb 2021 20:35:19 -0400 [thread overview]
Message-ID: <20210209003519.GA1244392@nvidia.com> (raw)
In-Reply-To: <20210202071309.2057998-1-leon@kernel.org>
On Tue, Feb 02, 2021 at 09:13:09AM +0200, Leon Romanovsky wrote:
> From: Yishai Hadas <yishaih@nvidia•com>
>
> Cleanup the synchronize_srcu() from the ODP flow as it was found to be a
> very heavy time consumer as part of dereg_mr.
>
> For example de-registration of 10000 ODP MRs each with size of 2M
> hugepage took 19.6 sec comparing de-registration of same number of non
> ODP MRs that took 172 ms.
>
> The new locking scheme uses the wait_event() mechanism which follows the
> use count of the MR instead of using synchronize_srcu().
>
> By that change, the time required for the above test took 95 ms which is
> even better than the non ODP flow.
>
> Once fully dropped the srcu usage, had to come with a lock to protect
> the XA access.
>
> As part of using the above mechanism we could also clean the
> num_deferred_work stuff and follow the use count instead.
>
> Signed-off-by: Yishai Hadas <yishaih@nvidia•com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia•com>
> ---
> Changelog:
> v2:
> * Add checks of xa_erase() result as an outcome of memory error injection tests.
> * Found extra place where we can change open-coded logic to use mlx5r_store_odp_mkey().
> v1: https://lore.kernel.org/linux-rdma/20210128064812.1921519-1-leon@kernel.org
> * Deleted not-relevant comment implicit_get_child_mr(), I have no idea
> why wrong version of this patch was sent as v0.
> * Deleted two new break lines added by me to make code more uniformly
> in before "return ..." (sometimes it has new line, sometimes doesn't).
> v0: https://lore.kernel.org/linux-rdma/20210127143051.1873866-1-leon@kernel.org
> ---
> drivers/infiniband/hw/mlx5/devx.c | 13 +-
> drivers/infiniband/hw/mlx5/main.c | 5 -
> drivers/infiniband/hw/mlx5/mlx5_ib.h | 31 ++-
> drivers/infiniband/hw/mlx5/mr.c | 26 +--
> drivers/infiniband/hw/mlx5/odp.c | 224 +++++++------------
> drivers/net/ethernet/mellanox/mlx5/core/mr.c | 1 +
> include/linux/mlx5/driver.h | 2 +
> 7 files changed, 127 insertions(+), 175 deletions(-)
Applied to for-next, thanks
Jason
prev parent reply other threads:[~2021-02-09 0:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 7:13 [PATCH mlx5-next v2] RDMA/mlx5: Cleanup the synchronize_srcu() from the ODP flow Leon Romanovsky
2021-02-09 0:35 ` Jason Gunthorpe [this message]
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=20210209003519.GA1244392@nvidia.com \
--to=jgg@nvidia$(echo .)com \
--cc=dledford@redhat$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=leon@kernel$(echo .)org \
--cc=linux-rdma@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=saeedm@nvidia$(echo .)com \
--cc=yishaih@nvidia$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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