[RFC] callout overhaul: part I
attilio at freebsd.org
Tue Nov 13 11:18:05 PST 2007
2007/11/8, Attilio Rao <attilio at freebsd.org>:
> Some benchmarks posted by rwatson some time ago (
> ) evicted callout_lock spinlock as an highly contented lock, in
> particular for network paths. Honestly, this is not a surprise at all
> :). This moved me in the direction of working on callouts, mainly for
> improving the scalability respect a large number of CPUs but, since
> callout are rather sensitive for the whole system, a general overhaul
> to the whole mecanism would be a good idea.
> In particular, I found phk's ideas about it (
> ) very valuable and I have on-going discussions with him and rwatson
> about these.
> phk's proposal is however not complete at 100% and I'm trying to
> integrate with other missing supports.
> This patch, for example:
I modified a little bit this patch in order to make stuff saner.
In particular, I introduced lock assertions in callout_stop(). So now,
when necessary, callout_stop() will panic if the lock is not held
while running over it.
The only one thing I really don't like is that I had to use the
"bogus" cast lock_object -> lock primitive (really, alredy used in
debugging functions). We should find a better solution about it as it
gets as constraints to have lock_object field as the first member of
any locking primitive.
Peace can only be achieved by understanding - A. Einstein
More information about the freebsd-arch