From: Theo Buehler Subject: Re: VFS syscalls & KERNEL_LOCK() To: Martin Pieuchot Cc: tech@openbsd.org Date: Tue, 3 Dec 2024 06:21:06 +0100 On Thu, Nov 28, 2024 at 07:59:50PM +0100, Martin Pieuchot wrote: > Diff below pushes the KERNEL_LOCK() inside the following syscalls: > > - open(2) & openat(2) > - stat(2), lstat(2), fstat(2), fstatat(2) > - __realpath() > > It makes %sys time decrease by ~5% here on the usual libLLVM parallel > build. I ran an amd64 bulk build with this. It may have been a bit faster than the previous runs (2d 7h 5m vs 2d 7h 30m), but this is less than 1% and within the usual noise of bulk build times. It also works seemingly without issues on my daily driver and my mac m1 mini. > More importantly it shows that doopenat() is the most contended > "syscall" by far in FlameGraphs. > > Reviews, tests and oks welcome! I have read the diff and could not spot anything wrong with it, but it's very far away from my usual stomping grounds. So for whatever that's worth, I am ok with this going in.