Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Nov 2007 20:17:57 +0100
From:      "Attilio Rao" <attilio@freebsd.org>
To:        freebsd-arch@freebsd.org
Subject:   Re: [RFC] callout overhaul: part I
Message-ID:  <3bbf2fe10711131117i1465b186u1662587b8ea680a0@mail.gmail.com>
In-Reply-To: <3bbf2fe10711081135y3473817ejbc72574e3e8c763d@mail.gmail.com>
References:  <3bbf2fe10711081135y3473817ejbc72574e3e8c763d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2007/11/8, Attilio Rao <attilio@freebsd.org>:
> Hello,
> Some benchmarks posted by rwatson some time ago (
> http://lists.freebsd.org/pipermail/freebsd-arch/2007-October/006945.html
> ) 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 (
> http://lists.freebsd.org/pipermail/freebsd-arch/2006-November/005730.html
> ) 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:
> http://people.freebsd.org/~attilio/callout_rwlock.diff

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.
New patch:
http://people.freebsd.org/~attilio/callout_rwlock2.diff

Thanks,
Attilio


-- 
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10711131117i1465b186u1662587b8ea680a0>