Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jul 2010 15:50:33 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        freebsd-geom@FreeBSD.org
Subject:   Re: Hyperactive g_event thread
Message-ID:  <4C4ED619.7050305@FreeBSD.org>
In-Reply-To: <24822.1280220363@critter.freebsd.dk>
References:  <24822.1280220363@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
> In message <4C4E919C.2060009@FreeBSD.org>, Alexander Motin writes:
> 
>> The only reason for doing it I
>> see in imperfect locking of g_run_events() loop and respective
>> tsleep()/wakeup(). So timeout there may be needed for collection
>> potentially lost wakeup() events.
> 
> Back when GEOM was written, the kernels SMP facilites were rather
> rudimentary and in a few cases downright buggy, so workarounds
> like that timeout were employed.
> 
> They can hopefully safely be removed now.

I have already removed alike timeouts on up/down threads and it indeed
was safe there. But are you really sure about this specific case? Cause
I'm not. Up/down threads using msleep and checking lack of work after
dropping/grabbing lock. Event thread instead does several tasks, drops
lock few times between them and uses tsleep(). I would say there should
be a bunch of race conditions.

-- 
Alexander Motin



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