Abolishing sleeps in issignal()

David Xu davidxu at FreeBSD.org
Tue Oct 9 18:40:37 PDT 2007


I think the performance problem here is that while sleep queue lock is
already hash scaled, but interruptable msleep still has to pass through
a single lock, the process lock, this is a serious serialization problem 
on SMP machine, especially when machine has 4 or more cores.
Also in most most runtime, process has few signals and job controls,
process lock and unlock should be avoided by checking a thread self's
flag instead, which uses thread lock.

I had ever worked out a patch to avoid the lock contention:
http://people.freebsd.org/~davidxu/patch/PCATCH_optimize.patch

mysql benchmark shows that on dual PIII machine it can improve
performance about 1 or 2 percentage, I had not tested it on 4 core
machine.

Regards,
David Xu



More information about the freebsd-arch mailing list