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

Sponsored:

Your customers are already searching—if you’re not online, they’re choosing someone else. A polished website builds trust, works 24/7, and turns interest into action. With RoseHosting, you don’t need code, a big budget, or weeks of waiting: pick a design, add your content, and launch fast.

Stop being invisible. Start owning your digital storefront today—build your WordPress site now.

Author:
Source

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