Update of /cvsroot/sbcl/sbcl/src/runtime
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30646/src/runtime
Commit patch from Juho Snellman (sbcl-devel 2004-07-16) for poor
performance characteristics in sig_stop_for_gc_handler.
... maybe a spinlock isn't right? Maybe we should have a
yielding_spinlock? Maybe we should have a different
spinlock implementation for SMP?
... in any case, performance now should be better for GCing when
more than two threads are around.
RCS file: /cvsroot/sbcl/sbcl/src/runtime/interrupt.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- interrupt.c 15 Apr 2004 09:19:17 -0000 1.59
+++ interrupt.c 16 Jul 2004 15:06:03 -0000 1.60
@@ -552,6 +552,16 @@
+ /* KLUDGE: at least on Linux, the kernel apparently schedules a
+ thread immediately it is signalled. However, we signal
+ SIG_STOP_FOR_GC while holding the spinlock, and consequently we
+ can easily end up with a kind of thundering herd of threads all
+ wanting to acquire the lock at the same time so that they can
+ tell the system that they've gone to sleep. So we yield here.
+ Whether this is the right fix or not is unknown. -- CSR,
+ 2004-07-16 */