From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
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: Tue, 18 Jun 2024 15:08:14 +0300 [thread overview]
Message-ID: <20240618120814.GF4025@unreal> (raw)
In-Reply-To: <20240617135905.GL19897@nvidia.com>
On Mon, Jun 17, 2024 at 10:59:05AM -0300, Jason Gunthorpe wrote:
> 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:
This patch is going to be backported without any relation to the commit
message as it has Fixes line.
Thanks
>
> 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.
Unfortunately, the patch was already merged, so I can't change the
commit message in for-next branch.
Thanks
>
> Jason
next prev parent reply other threads:[~2024-06-18 12:08 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
2024-06-18 12:08 ` Leon Romanovsky [this message]
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=20240618120814.GF4025@unreal \
--to=leon@kernel.org \
--cc=christian.koenig@amd.com \
--cc=cmeiohas@nvidia.com \
--cc=jgg@nvidia.com \
--cc=jianxin.xiong@intel.com \
--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).