From: Jason Gunthorpe <jgg@ziepe.ca>
To: John Hubbard <jhubbard@nvidia.com>
Cc: Pantelis Antoniou <p.antoniou@partner.samsung.com>,
David Hildenbrand <david@redhat.com>,
Peter Xu <peterx@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
mm-commits@vger.kernel.org, wade.farnsworth@siemens.com,
c.briere@samsung.com, artem.k@samsung.com,
David Howells <dhowells@redhat.com>
Subject: Re: + fix-zero-copy-i-o-on-__get_user_pages-allocated-pages.patch added to mm-hotfixes-unstable branch
Date: Fri, 9 May 2025 14:33:14 -0300 [thread overview]
Message-ID: <20250509173314.GD138689@ziepe.ca> (raw)
In-Reply-To: <b7c796e9-81a9-4f1e-ba84-5e9af061ee1e@nvidia.com>
On Fri, May 09, 2025 at 10:11:01AM -0700, John Hubbard wrote:
> On 5/9/25 9:30 AM, Pantelis Antoniou wrote:
> > On Thu, 8 May 2025 21:34:28 +0200
> > David Hildenbrand <david@redhat.com> wrote:
> ...
> > So what's the plan now?
> >
> > DRM seems to be the first place to be fixed, however am I wrong in
> > thinking that most of the uses of remap_pfn_range() are wrong in the
> > context of system page backed memory?
> >
> > Should we start with an implementation of something like remap_range()
> > which does not set PFNMAP bit. Its use is wrong in that context IMO.
> >
> > And then move to DRM proper and replace the call to remap_pfn_range()
> > with it and see how far we go.
> >
> That sounds like the right approach to me. Because the way we get into
> these problems is mostly due to the lack of a clear example, and so
> providing something correct to call is the way out.
Thing is if you want to just install struct page memory you don't need
MIXEDMAP or a special call, just insert the pages in the normal way.
The issue here seems to be that the DRM caller wants to mix and match
struct page and non-struct page memory, so I think you want an
entirely different API for managing effectively a scatter of two
different memory types and computing what the proper VMA flags should
be based on what was given.
OR DRM is actually using remap_pfn specifical because it does not want
3rd parties taking the page refcount because that destroys its
lifetime model..
Jason
next prev parent reply other threads:[~2025-05-09 17:33 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 21:55 + fix-zero-copy-i-o-on-__get_user_pages-allocated-pages.patch added to mm-hotfixes-unstable branch Andrew Morton
2025-05-08 14:16 ` Peter Xu
2025-05-08 14:36 ` Pantelis Antoniou
2025-05-08 15:08 ` Peter Xu
2025-05-08 15:10 ` David Hildenbrand
2025-05-08 15:27 ` Pantelis Antoniou
2025-05-08 15:40 ` David Hildenbrand
2025-05-08 15:48 ` Pantelis Antoniou
2025-05-08 16:25 ` Pantelis Antoniou
2025-05-08 17:35 ` Jason Gunthorpe
2025-05-08 17:47 ` Pantelis Antoniou
2025-05-08 18:01 ` Jason Gunthorpe
2025-05-08 18:02 ` David Hildenbrand
2025-05-08 18:11 ` Pantelis Antoniou
2025-05-08 18:26 ` David Hildenbrand
2025-05-08 18:47 ` Peter Xu
2025-05-08 19:04 ` David Hildenbrand
2025-05-08 19:06 ` Jason Gunthorpe
2025-05-08 19:08 ` Peter Xu
2025-05-08 19:12 ` Jason Gunthorpe
2025-05-08 19:16 ` David Hildenbrand
2025-05-08 19:39 ` Peter Xu
2025-05-08 19:14 ` David Hildenbrand
2025-05-08 19:19 ` Jason Gunthorpe
2025-05-08 19:34 ` David Hildenbrand
2025-05-09 16:30 ` Pantelis Antoniou
2025-05-09 17:11 ` John Hubbard
2025-05-09 17:33 ` Jason Gunthorpe [this message]
2025-05-09 17:50 ` Pantelis Antoniou
2025-05-09 18:39 ` Jason Gunthorpe
2025-05-08 19:11 ` Jason Gunthorpe
2025-05-08 15:17 ` Pantelis Antoniou
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=20250509173314.GD138689@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=akpm@linux-foundation.org \
--cc=artem.k@samsung.com \
--cc=c.briere@samsung.com \
--cc=david@redhat.com \
--cc=dhowells@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=mm-commits@vger.kernel.org \
--cc=p.antoniou@partner.samsung.com \
--cc=peterx@redhat.com \
--cc=wade.farnsworth@siemens.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.