mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/6] vdso/datastore: Allow prefaulting by mlockall()
@ 2026-05-18  9:49 Thomas Weißschuh
  2026-05-18  9:49 ` [PATCH v3 1/6] vdso/datastore: Rename data pages variable Thomas Weißschuh
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-05-18  9:49 UTC (permalink / raw)
  To: Anna-Maria Behnsen, Frederic Weisbecker, Andy Lutomirski,
	Vincenzo Frascino, Thomas Gleixner
  Cc: Nam Cao, Sebastian Andrzej Siewior, linux-kernel, Andrew Morton,
	David Hildenbrand, Jason Gunthorpe, John Hubbard, Peter Xu,
	linux-mm, Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka,
	Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
	Thomas Weißschuh

While mlockall() is meant to lock page *memory*, effectively it will
also create and lock the corresponding page table entries.
Latency-sensitive applications expect not to experience any pagefaults
after calling mlockall(). However mlockall() ignores VM_IO mappings,
which is used by the generic vDSO datastore.
While the fault handler itself is very fast, going through the full
pagefault exception handling is much slower, on the order of 20us in a
test machine.

Since the memory behind the datastore mappings is always present and
accessible it is not necessary to use VM_IO for them.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Changes in v3:
- Rebase on v7.1-rc1
- Stop using zero page, which can not be mapped in this way
- Link to v2: https://lore.kernel.org/r/20250901-vdso-mlockall-v2-0-68f5a6f03345@linutronix.de

Changes in v2:
- Stop using nth_page() which is being removed
- Link to v1: https://lore.kernel.org/r/20250812-vdso-mlockall-v1-0-2f49ba7cf819@linutronix.de

---
Thomas Weißschuh (6):
      vdso/datastore: Rename data pages variable
      vdso/datastore: Map pages in terms of the faults pgoff
      vdso/datastore: Map zeroed pages for unavailable data
      vdso/datastore: Explicitly prevent remote access to timens vvar page
      vdso/datastore: Allow prefaulting by mlockall()
      vdso/datastore: Simplify the mapping logic for VDSO_TIME_PAGE_OFFSET

 kernel/time/namespace_vdso.c |  7 ++---
 lib/vdso/datastore.c         | 65 ++++++++++++++++++++------------------------
 2 files changed, 32 insertions(+), 40 deletions(-)
---
base-commit: b0f603a5e7c076c7e424b5a621022b3bec16225b
change-id: 20250721-vdso-mlockall-461bb33205b1

Best regards,
--  
Thomas Weißschuh <thomas.weissschuh@linutronix.de>


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-06-03 12:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-18  9:49 [PATCH v3 0/6] vdso/datastore: Allow prefaulting by mlockall() Thomas Weißschuh
2026-05-18  9:49 ` [PATCH v3 1/6] vdso/datastore: Rename data pages variable Thomas Weißschuh
2026-05-18  9:49 ` [PATCH v3 2/6] vdso/datastore: Map pages in terms of the faults pgoff Thomas Weißschuh
2026-05-18  9:49 ` [PATCH v3 3/6] vdso/datastore: Map zeroed pages for unavailable data Thomas Weißschuh
2026-05-18  9:49 ` [PATCH v3 4/6] vdso/datastore: Explicitly prevent remote access to timens vvar page Thomas Weißschuh
2026-05-18  9:49 ` [PATCH v3 5/6] vdso/datastore: Allow prefaulting by mlockall() Thomas Weißschuh
2026-05-18  9:49 ` [PATCH v3 6/6] vdso/datastore: Simplify the mapping logic for VDSO_TIME_PAGE_OFFSET Thomas Weißschuh
2026-06-02 18:41 ` [PATCH v3 0/6] vdso/datastore: Allow prefaulting by mlockall() David Hildenbrand (Arm)
2026-06-03 10:10   ` Thomas Weißschuh
2026-06-03 11:35     ` David Hildenbrand (Arm)
2026-06-03 12:47       ` Thomas Weißschuh
2026-06-03 12:57         ` David Hildenbrand (Arm)

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®