CVSROOT:        /cvs
Module name:    src
Changes by:     kette...@cvs.openbsd.org        2016/01/27 01:40:05

Modified files:
        lib/librthread : rthread.h rthread_fork.c rthread_libc.c 

Log message:
Replace the malloc spinlock with a mutex.  This lock is held over system calls
which run for many cycles and may even sleep.  This leads to other threads
spinning for a long time waiting on the lock.  Using a mutex means those
threads go to sleep and get woken up when the lock is released, which results
in a lot less CPU usage.  More work is needed to improve the performance of
threaded code that suffers from malloc lock contention, but this diff makes
ports like Firefox significantly more usable.

Tested by many.

ok mpi@, guenther@, tedu@, jca@

Reply via email to