adaptive serialize enter
Sepherosa Ziehau
sepherosa at gmail.com
Sun May 4 03:50:08 PDT 2008
Hi,
Following patch adds adaptive serialize enter support for SMP. It
spins a little bit before calling tsleep. I have used it on ifq in a
local patch with very good results. In the current setting, it favors
spinning more than sleeping. debug.serialize_boround and
debug.serialize_bolimit could be used to change what it favors. When
the contention is too heavy, it is much better than pure spinlock;
system will not be choked for ~1seconds under extreme condition by
chance (it is really very _rare_ after randomizing spinlock backoff,
but it does happen)
Please review it:
http://leaf.dragonflybsd.org/~sephe/lwkt_serialize.c.diff
Best Regards,
sephe
--
Live Free or Die
More information about the Submit
mailing list