]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Optimize the adaptive mutex spin a bit. Use a simple while loop with
authorjhb <jhb@FreeBSD.org>
Tue, 4 Jun 2002 21:53:48 +0000 (21:53 +0000)
committerjhb <jhb@FreeBSD.org>
Tue, 4 Jun 2002 21:53:48 +0000 (21:53 +0000)
commit408adb728768f69cb8966c1191020d6ea7e66be5
tree74dd2af195979cba72051f324486634264a843a6
parent1ba6786436ce1fc3d10f82452a167a784b696702
Optimize the adaptive mutex spin a bit.  Use a simple while loop with
simple reads (and on IA32, a "pause" instruction for each interation of the
loop) to spin until either the mutex owner field changes, or the lock owner
stops executing.

Suggested by: tanimura
Tested on: i386
sys/kern/kern_mutex.c
sys/kern/subr_turnstile.c