OpenBSD cvs log

created 2024-12-01T14:01:41Z
begin 2024-11-28T00:00:00Z
end 2024-11-29T00:00:00Z
path src/sys
commits 4

date 2024-11-28T02:01:57Z
author dlg
files src/sys/kern/init_main.c log diff annotate
src/sys/kern/kern_synch.c log diff annotate
message avoid lock contention in __thrsleep and __thrwakeup syscalls

turns out the __thrsleep and __thrwakeup syscalls largely coordinate
using a single lock per process. if you have heavily threaded code
building locks in userland out of thrsleep, this kernel lock gets
hammered. this is true even if userland thinks it's operating on
separate locks, it all ends up serialised in the kernel. this reduces
the throughput of these heavily threaded programs.

the big change is hashing thrsleep waiters into an different
locks/lists based on their "id" to try and avoid all locks in a
process contending on a single lock. the hash is shared by all
processes though.

the change also avoids having a waiter re-take the lock to avoid
contention on the thrwakeup code which is currently holding the lock.

__thrsleep and __thrwakeup seem to be largely unused these days,
except by go. go still uses it as a backend to it's locks, and also
creates a lot of threads which end up contending on the lock. these
changes provide an improvement for go programs.

the contention was pointed out by nick owens
jsing@ and nick owens did a bit of testing

date 2024-11-28T13:13:03Z
author aoyama
files src/sys/arch/luna88k/conf/GENERIC log diff annotate
message Replace magic numbers to macro defined values.
Also make it possible to change the amount of 3-port RAM usage by the
kernel option.

date 2024-11-28T13:13:04Z
author aoyama
files src/sys/arch/luna88k/dev/if_le.c log diff annotate
message Replace magic numbers to macro defined values.
Also make it possible to change the amount of 3-port RAM usage by the
kernel option.

date 2024-11-28T18:54:36Z
author gkoehler
files src/sys/arch/powerpc64/include/cpu.h log diff annotate
src/sys/arch/powerpc64/powerpc64/cpu.c log diff annotate
src/sys/arch/powerpc64/powerpc64/pmap.c log diff annotate
message Move cpu_features to hwcap and cpu_features2 to hwcap2

ok jca@