mmap(2), munmap(2), and mprotect(2) unlocked

Author:
Source

Sponsored:

Atlas of AI: Power, Politics, and the Planetary Costs of Artificial Intelligence - Audiobook


Uncover the true cost of artificial intelligence.

Listen now, and see the system behind the screens before the future listens to you. = > Atlas of AI $0.00 with trial. Read by Larissa Gallagher


Martin Pieuchot (mpi@) has
committed
a change unlocking the
mmap(2),
munmap(2),
and
mprotect(2)
system calls:

CVSROOT:	/cvs
Module name:	src
Changes by:	mpi@cvs.openbsd.org	2022/11/08 04:05:57

Modified files:
	sys/kern       : syscalls.master 

Log message:
Mark mmap(2), munmap(2) and mprotect(2) as NOLOCK.

Accesses to data structures used by these syscalls are serialized by the
VM map lock with the exception of file mappings which are still protected
by the KERNEL_LOCK().

Unlocking this set of syscalls improves most of userland workloads.

Tested by many including robert@ (since 2 years), mlarkin@, kn@, sdk@,
jca@, aoyama@, naddy@, Scott Bennett and others. Thanks to all!

Joint work with kn@.

ok robert@, aja@, kettenis@, kn@, deraadt@, beck@

The improvement in workload performance can
be quite marked.
Following Martin’s
request for testing,
Mike Larkin (mlarkin@)
reported build performance improvement of over 12%!

Read more