Hyperactive g_event thread

Alexander Motin mav at FreeBSD.org
Sun Oct 24 18:07:37 UTC 2010


Jaakko Heinonen wrote:
> I drafted a patch to use g_eventlock instead to protect against losing
> wakeups:
> 
> 	http://people.freebsd.org/~jh/patches/geom-eventproc-sleep.diff
> 
> Reviews and/or testing will be welcomed.

I don't think that moving wakeup() inside the lock is needed. It is
important to queue events under the lock to not loose them, but wakeup()
IMHO could be left outside. At some places in GEOM I did directly
opposite - move wakeup() out of the lock. Lock profiling reports
slightly lower lock contention in that case and AFAIR it slightly
improves performance under high load. But probably it is not so
important for event thread.

-- 
Alexander Motin


More information about the freebsd-geom mailing list