On Sun, Nov 06, 2022 at 11:54:13AM +0100, Martin Pieuchot wrote:
> These 3 syscalls should now be ready to run w/o KERNEL_LOCK(). This
> will reduce contention a lot. I'd be happy to hear from test reports
> on many architectures and possible workloads.
>
> Do not forget to run "make syscalls" before building the kernel.
>
> Index: syscalls.master
> ===================================================================
> RCS file: /cvs/src/sys/kern/syscalls.master,v
> retrieving revision 1.234
> diff -u -p -r1.234 syscalls.master
> --- syscalls.master 25 Oct 2022 16:10:31 -0000 1.234
> +++ syscalls.master 6 Nov 2022 10:50:45 -0000
> @@ -126,7 +126,7 @@
> struct sigaction *osa); }
> 47 STD NOLOCK { gid_t sys_getgid(void); }
> 48 STD NOLOCK { int sys_sigprocmask(int how, sigset_t mask); }
> -49 STD { void *sys_mmap(void *addr, size_t len, int prot, \
> +49 STD NOLOCK { void *sys_mmap(void *addr, size_t len, int prot, \
> int flags, int fd, off_t pos); }
> 50 STD { int sys_setlogin(const char *namebuf); }
> #ifdef ACCOUNTING
> @@ -171,8 +171,8 @@
> const struct kevent *changelist, int nchanges, \
> struct kevent *eventlist, int nevents, \
> const struct timespec *timeout); }
> -73 STD { int sys_munmap(void *addr, size_t len); }
> -74 STD { int sys_mprotect(void *addr, size_t len, \
> +73 STD NOLOCK { int sys_munmap(void *addr, size_t len); }
> +74 STD NOLOCK { int sys_mprotect(void *addr, size_t len, \
> int prot); }
> 75 STD { int sys_madvise(void *addr, size_t len, \
> int behav); }
>
FWIW, this improves build performance by over 12% here locally.
-ml