From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Chiara Meiohas <cmeiohas@nvidia.com>,
Christian Koenig <christian.koenig@amd.com>,
Jianxin Xiong <jianxin.xiong@intel.com>,
linux-rdma@vger.kernel.org,
Michael Guralnik <michaelgur@nvidia.com>,
"Michael J. Ruhl" <michael.j.ruhl@intel.com>,
Sean Hefty <sean.hefty@intel.com>
Subject: Re: [PATCH rdma-next] RDMA/mlx5: Set mkeys for dmabuf at PAGE_SIZE
Date: Mon, 17 Jun 2024 10:59:05 -0300 [thread overview]
Message-ID: <20240617135905.GL19897@nvidia.com> (raw)
In-Reply-To: <1e2289b9133e89f273a4e68d459057d032cbc2ce.1718301631.git.leon@kernel.org>
On Thu, Jun 13, 2024 at 09:01:42PM +0300, Leon Romanovsky wrote:
> From: Chiara Meiohas <cmeiohas@nvidia.com>
>
> Set the mkey for dmabuf at PAGE_SIZE to support any SGL
> after a move operation.
>
> ib_umem_find_best_pgsz returns 0 on error, so it is
> incorrect to check the returned page_size against PAGE_SIZE
This commit message is not clear enough for something that need to be
backported:
RDMA/mlx5: Support non-page size aligned DMABUF mkeys
The mkey page size for DMABUF is fixed at PAGE_SIZE because we have to
support a move operation that could change a large-sized page list
into a small page-list and the mkey must be able to represent it.
The test for this is not quite correct, instead of checking the output
of mlx5_umem_find_best_pgsz() the call to ib_umem_find_best_pgsz
should specify the exact HW/SW restriction - only PAGE_SIZE is
accepted.
Then the normal logic for dealing with leading/trailing sub page
alignment works correctly and sub page size DMBUF mappings can be
supported.
This is particularly painful on 64K kernels.
Jason
next prev parent reply other threads:[~2024-06-17 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 18:01 [PATCH rdma-next] RDMA/mlx5: Set mkeys for dmabuf at PAGE_SIZE Leon Romanovsky
2024-06-17 13:59 ` Jason Gunthorpe [this message]
2024-06-18 12:08 ` Leon Romanovsky
2024-06-18 13:02 ` Jason Gunthorpe
2024-06-19 8:30 ` 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=20240617135905.GL19897@nvidia.com \
--to=jgg@nvidia.com \
--cc=christian.koenig@amd.com \
--cc=cmeiohas@nvidia.com \
--cc=jianxin.xiong@intel.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=michael.j.ruhl@intel.com \
--cc=michaelgur@nvidia.com \
--cc=sean.hefty@intel.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).