Project

General

Profile

Actions

Bug #1002

closed

adaptive serialize enter

Added by sepherosa about 16 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

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

Actions

Also available in: Atom PDF