Trivial(?) reorganization of topology lock in geom_event

Marius Nünnerich marius at nuenneri.ch
Sun Dec 7 16:20:56 PST 2008


On Sat, Dec 6, 2008 at 10:00 PM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
> In message <b649e5e0812041241ja4c3886s526590c98e59f629 at mail.gmail.com>, "=?ISO-
> 8859-1?Q?Marius_N=FCnnerich?=" writes:
>>Hi,
>>
>>while working on the DTrace probes for geom I noticed that
>>g_topology_lock() is called 20 times per second from the g_event
>>thread, even though the thread only runs 10 times per second when
>>idle. Maybe it is possible to change the locking like in this patch? I
>>also changed the position of one unlocking of g_eventlock.
>
> In theory the timeout is not necessary, it was added as a stopgap
> because there were synchronisation issues long time ago.
>
> Try dropping the timeout and see if you can provoke problems,
> if not, kill it.

Did so, please take a look at this patch:
http://nuenneri.ch/freebsd/geom_tl2.patch

I am running a version of this with the DTrace probes included, I hope
the patch is complete.
I did a few buildkernels and some of the geom regression tests, so far
no problems.
I changed the position of the loop to better match how it's like in
the up and down threads.
What do you think of it?

Thanks
Marius


More information about the freebsd-geom mailing list