From: Jason Gunthorpe <jgg@ziepe.ca>
To: Gal Pressman <galpress@amazon.com>
Cc: Michal Kalderon <mkalderon@marvell.com>,
"dledford@redhat.com" <dledford@redhat.com>,
"leon@kernel.org" <leon@kernel.org>,
"sleybo@amazon.com" <sleybo@amazon.com>,
Ariel Elior <aelior@marvell.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [RFC rdma 1/3] RDMA/core: Create a common mmap function
Date: Thu, 4 Jul 2019 09:35:11 -0300 [thread overview]
Message-ID: <20190704123511.GA3447@ziepe.ca> (raw)
In-Reply-To: <85247f12-1d78-0e66-fadc-d04862511ca7@amazon.com>
On Wed, Jul 03, 2019 at 11:19:34AM +0300, Gal Pressman wrote:
> On 03/07/2019 1:31, Jason Gunthorpe wrote:
> >> Seems except Mellanox + hns the mmap flags aren't ABI.
> >> Also, current Mellanox code seems like it won't benefit from
> >> mmap cookie helper functions in any case as the mmap function is very specific and the flags used indicate
> >> the address and not just how to map it.
> >
> > IMHO, mlx5 has a goofy implementaiton here as it codes all of the object
> > type, handle and cachability flags in one thing.
>
> Do we need object type flags as well in the generic mmap code?
At the end of the day the driver needs to know what page to map during
the mmap syscall.
mlx5 does this by encoding the page type in the address, and then many
types have seperate lookups based onthe offset for the actual page.
IMHO the single lookup and opaque offset is generally better..
Since the mlx5 scheme is ABI it can't be changed unfortunately.
If you want to do user controlled cachability flags, or not, is a fair
question, but they still become ABI..
I'm wondering if it really makes sense to do that during the mmap, or
if the cachability should be set as part of creating the cookie?
> Another issue is that these flags aren't exposed in an ABI file, so
> a userspace library can't really make use of it in current state.
Woops.
Ah, this is all ABI so you need to dig out of this hole ASAP :)
Jason
next parent reply other threads:[~2019-07-04 12:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190627135825.4924-1-michal.kalderon@marvell.com>
[not found] ` <20190627135825.4924-2-michal.kalderon@marvell.com>
[not found] ` <d6e9bc3b-215b-c6ea-11d2-01ae8f956bfa@amazon.com>
[not found] ` <20190627155219.GA9568@ziepe.ca>
[not found] ` <14e60be7-ae3a-8e86-c377-3bf126a215f0@amazon.com>
[not found] ` <MN2PR18MB318228F0D3DA5EA03A56573DA1FC0@MN2PR18MB3182.namprd18.prod.outlook.com>
[not found] ` <MN2PR18MB3182EC9EA3E330E0751836FDA1F80@MN2PR18MB3182.namprd18.prod.outlook.com>
[not found] ` <20190702223126.GA11860@ziepe.ca>
[not found] ` <85247f12-1d78-0e66-fadc-d04862511ca7@amazon.com>
2019-07-04 12:35 ` Jason Gunthorpe [this message]
2019-07-05 15:29 ` [EXT] Re: [RFC rdma 1/3] RDMA/core: Create a common mmap function Michal Kalderon
2019-07-05 15:32 ` Jason Gunthorpe
2019-07-05 17:24 ` Michal Kalderon
2019-07-05 17:35 ` Jason Gunthorpe
2019-07-07 6:41 ` Gal Pressman
2019-07-07 11:30 ` Michal Kalderon
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=20190704123511.GA3447@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=aelior@marvell.com \
--cc=dledford@redhat.com \
--cc=galpress@amazon.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mkalderon@marvell.com \
--cc=sleybo@amazon.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