From: Rik van Riel <riel@surriel.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>,
linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Dave Hansen <dave.hansen@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Suren Baghdasaryan <surenb@google.com>,
Lorenzo Stoakes <ljs@kernel.org>,
Vlastimil Babka <vbabka@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
John Hubbard <jhubbard@nvidia.com>, Peter Xu <peterx@redhat.com>,
Matthew Wilcox <willy@infradead.org>,
Usama Arif <usamaarif642@gmail.com>,
kernel-team@meta.com
Subject: Re: [PATCH 1/2] mm/gup: pass an end address to follow_page_mask() and return a page count
Date: Wed, 29 Jul 2026 13:31:26 -0400 [thread overview]
Message-ID: <432cbf0c1194174259736d929f7f919ef55d19a9.camel@surriel.com> (raw)
In-Reply-To: <a3411350-d4c7-47c7-9ed8-b36748815660@kernel.org>
On Wed, 2026-07-29 at 09:16 +0200, David Hildenbrand (Arm) wrote:
>
> This patch moves us closer towards the GUP-fast path, however, that
> is about to
> change:
>
>
> https://lore.kernel.org/all/20260219050250.266876166@ruivo.org/
>
> With that in mind, I guess in the future we want to have:
>
> static long follow_page_mask(struct vm_area_struct *vma,
> unsigned long address, unsigned long end,
> unsigned int flags, struct page **pages)
>
> or even better, now that follow_page() no longer exists, in light of
> gup_fast():
>
>
> static long gup_slow(struct vm_area_struct *vma,
> unsigned long address, unsigned long end,
> unsigned int flags, struct page **pages)
>
> Returning the number of pinned pages.
>
>
> In particular, such an interface would allows us to process multiple
> ptes/pmds/... in one go, without having to restart the page table
> walk all the
> time for each non-batchable folio.
>
Let me give that a try. This looks like a very
nice optimization, and cleanup.
--
All Rights Reversed.
next prev parent reply other threads:[~2026-07-29 17:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 3:02 [PATCH 0/2] mm/gup: batch PTE-mapped large folios in follow_page_mask() Rik van Riel
2026-07-29 3:02 ` [PATCH 1/2] mm/gup: pass an end address to follow_page_mask() and return a page count Rik van Riel
2026-07-29 7:16 ` David Hildenbrand (Arm)
2026-07-29 17:31 ` Rik van Riel [this message]
2026-07-29 3:02 ` [PATCH 2/2] mm/gup: batch contiguous PTE-mapped large folios in follow_page_mask() Rik van Riel
2026-07-29 7:53 ` David Hildenbrand (Arm)
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=432cbf0c1194174259736d929f7f919ef55d19a9.camel@surriel.com \
--to=riel@surriel.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=kernel-team@meta.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=peterx@redhat.com \
--cc=peterz@infradead.org \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=usamaarif642@gmail.com \
--cc=vbabka@kernel.org \
--cc=willy@infradead.org \
/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
all inboxes | Powered by JetHome®