DragonFly submit List (threaded) for 2008-05
DragonFly BSD
DragonFly submit List (threaded) for 2008-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

adaptive serialize enter


From: "Sepherosa Ziehau" <sepherosa@xxxxxxxxx>
Date: Sun, 4 May 2008 18:47:19 +0800

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



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