Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Oct 2010 20:37:11 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        Jaakko Heinonen <jh@FreeBSD.org>
Cc:        =?UTF-8?B?TWFyaXVzIE7DvG5uZXJpY2g=?= <marius@nuenneri.ch>, Poul-Henning Kamp <phk@phk.freebsd.dk>, freebsd-geom@freebsd.org
Subject:   Re: Hyperactive g_event thread
Message-ID:  <4CC46EC7.2090703@FreeBSD.org>
In-Reply-To: <20101021174301.GA1381@a91-153-123-205.elisa-laajakaista.fi>
References:  <4C4ED619.7050305@FreeBSD.org> <27237.1280241532@critter.freebsd.dk> <AANLkTi=uRPV2T0=t_1s=Jc4PmBtai=__HqhCtYpiDdTQ@mail.gmail.com> <AANLkTikvV4oymBBA%2B_0zbzd_edS8dRfqqJRODE0989%2Bn@mail.gmail.com> <4C4F171C.9010106@FreeBSD.org> <20101021174301.GA1381@a91-153-123-205.elisa-laajakaista.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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