Thread (150 messages) 150 messages, 8 authors, 2h ago

Re: [PATCH v3 09/40] docs: filesystems: update mmap_prepare docs for discontig kernel pgs

From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Date: 2026-09-29 11:21:57
Also in: bpf, fuse-devel, kvm, kvm-riscv, kvmarm, linux-arch, linux-doc, linux-fbdev, linux-fsdevel, linux-mm, linux-perf-users, linux-rdma, linux-s390, linux-scsi, linux-sound, linux-usb, linuxppc-dev, lkml, selinux, sparclinux

On Fri, Sep 25, 2026 at 05:01:51PM -0400, Zi Yan wrote:
On Thu Sep 17, 2026 at 12:22 PM EDT, Lorenzo Stoakes (ARM) wrote:
quoted
 Documentation/filesystems/mmap_prepare.rst | 81 ++++++++++++++++++++++++++++++
quoted
+* ``discontig_kernel_map_page()`` - Maps a single page, correctly handling
+  compound pages (if the compound page is bigger than the remaining pages in the
+  VMA, then only those pages that fit will be mapped). For a compound page, the
+  head page must be passed.
+* ``discontig_kernel_map_page_range()`` - Map an array of pages of a specified
+  size. Note that if the number of pages specified exceeds the VMA size then an
+  error will arise.
Why do mapping a compound page and a page range have different behaviors
on the bound? Either both do partial mappings or give errors when a
given input cannot be mapped as a whole in the VMA.
Ack, yeah similar to Suren's point on patch 8, will clamp for both.

--
Cheers, Lorenzo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help