freebsd-dev/sys/security/mac
Mateusz Guzik deb2e577a2 mac: use a sleepable rmlock instead of an sx lock
If any non-static modules are loaded (and mac_ntpd tends to be), the lock is
taken all the time al over the kernel. On platforms like arm64 this results in
an avoidable significant performance degradation. Since write-locking is almost
never needed, use a primitive optimized towards read-locking.

Sample result of building the kernel on tmpfs 11 times:
stock           11142.80s user 6704.44s system 4924% cpu 6:02.42 total
patched         11118.95s user 2374.94s system 4547% cpu 4:56.71 total
2019-12-27 11:23:32 +00:00
..
mac_audit.c
mac_cred.c
mac_framework.c mac: use a sleepable rmlock instead of an sx lock 2019-12-27 11:23:32 +00:00
mac_framework.h
mac_inet6.c
mac_inet.c When MAC is enabled and a policy module is loaded, don't unconditionally 2019-05-03 20:38:43 +00:00
mac_internal.h When MAC is enabled and a policy module is loaded, don't unconditionally 2019-05-03 20:38:43 +00:00
mac_label.c
mac_net.c When MAC is enabled and a policy module is loaded, don't unconditionally 2019-05-03 20:38:43 +00:00
mac_pipe.c
mac_policy.h
mac_posix_sem.c
mac_posix_shm.c
mac_priv.c
mac_process.c Instead of looking up a predecessor or successor to the current map 2019-11-20 16:06:48 +00:00
mac_socket.c
mac_syscalls.c
mac_system.c
mac_sysv_msg.c
mac_sysv_sem.c
mac_sysv_shm.c
mac_vfs.c