Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libpthread



Module Name:    src
Committed By:   ad
Date:           Sat Aug  4 13:37:51 UTC 2007

Modified Files:
        src/lib/libpthread: pthread.c pthread_barrier.c pthread_cond.c
            pthread_int.h pthread_lock.c pthread_mutex.c pthread_rwlock.c
            pthread_types.h sem.c

Log Message:
Some significant performance improvements, and a fix for a race with pthread
detach/join.

- Make mutex acquire spin for a short time, as done with spinlocks.
- Make the number of spins controllable with the env var PTHREAD_NSPINS.
- Reduce the amount of time that libpthread internal spinlocks are held.
- Rely more on the barrier effects of park/unpark to avoid taking spinlocks.
- Simplify the locking around pthreads and the global queues.
- Align per-thread sync data on a 128 byte boundary.
- Offset thread stacks by a small amount to try and reduce cache thrash.


To generate a diff of this commit:
cvs rdiff -r1.68 -r1.69 src/lib/libpthread/pthread.c
cvs rdiff -r1.12 -r1.13 src/lib/libpthread/pthread_barrier.c
cvs rdiff -r1.31 -r1.32 src/lib/libpthread/pthread_cond.c
cvs rdiff -r1.42 -r1.43 src/lib/libpthread/pthread_int.h
cvs rdiff -r1.20 -r1.21 src/lib/libpthread/pthread_lock.c
cvs rdiff -r1.28 -r1.29 src/lib/libpthread/pthread_mutex.c
cvs rdiff -r1.18 -r1.19 src/lib/libpthread/pthread_rwlock.c
cvs rdiff -r1.6 -r1.7 src/lib/libpthread/pthread_types.h
cvs rdiff -r1.14 -r1.15 src/lib/libpthread/sem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index