Re: [RFC] callout overhaul: part I



2007/11/8, Attilio Rao <attilio@xxxxxxxxxxx>:
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
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [PATCH -mm v4 6/9] atmel_serial: Split the interrupt handler
    ... existed of a set of patches suitable ... plus an additional patch for Preempt-RT only. ... the splitup of the interrupt handler was also needed for ... * uart_start, which takes the lock. ...
    (Linux-Kernel)
  • Re: [PATCH 0/5] ppc RT: Realtime preempt support for PPC
    ... checks the value of lock is assembly and treats lock as signed. ... Thus it is also OK that you left this chunk out of your patch. ... Patch #4 went in via the PPC tree. ...
    (Linux-Kernel)
  • Re: Giantless VFS.
    ... On Sat, 2004-11-20 at 00:24 -0500, Jeff Roberson wrote: ... > I have a patch that I would like people to test and review. ... > This patch removes Giant from the read, write, and fstatsyscalls, ... > number of lock operations for the common cases which resulted in a couple ...
    (freebsd-current)
  • Re: [patch 6/8] 2.6.22-rc3 perfmon2 : IBS implementation for AMD64
    ... pls. see 2nd patch version. ... 'count' may only be incremented if the PMD is used. ... It seems this function is only called if the lock is set, ... Operating System Research Center ...
    (Linux-Kernel)
  • final SCSI updates (hopefully) for 2.6.0
    ... The patch is here ... o scsi device ref count ChangeSet@1.1482 ... * the list, and freeing @sdev. ... # the lock again to traverse the list. ...
    (Linux-Kernel)