Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Feb 2004 14:40:03 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Preventing deadlocks on the event queue.
Message-ID:  <20040204134003.GG14639@garage.freebsd.pl>
In-Reply-To: <66984.1075133737@critter.freebsd.dk>
References:  <20040126161300.GJ565@garage.freebsd.pl> <66984.1075133737@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--+sHJum3is6Tsg7/J
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jan 26, 2004 at 05:15:37PM +0100, Poul-Henning Kamp wrote:
+> >+> > 	http://garage.freebsd.pl/patches/geom_event_deadlock.patch
+> >+>=3D20
+> >+> Do you really want to make this a separate function?  Since it's jus=
t a
+> >+> one-line comparison, wouldn't a macro suffice?
+> >
+> >I want to avoid exporting 'g_event_proc' from geom_kern.c (it is declar=
eted
+> >staticaly there).
+>=20
+> Right, g_event_proc should stay local to geom_kern.c if at all possible.
+>=20
+> I'm still trying to see if I can find a more elegant way to do it, but
+> curproc/curthread is probably the trick.

I think this is more elegant way:

	http://garage.freebsd.pl/patches/geom_event_deadlock.2.patch

It will not be needed if we uncomment g_topology_assert_not(),
but my previous patch will protect even from something like this:

	g_topology_unlock();
	sx_xunlock(&g_eventstall);
	g_waitfor_event();
	sx_xlock(&g_eventstall);
	g_topology_lock();
:)

--=20
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd@FreeBSD.org                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!

--+sHJum3is6Tsg7/J
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQFAIPYzForvXbEpPzQRAjiTAJ9SjZzFclj6RTvwJzqFDftPI9FjoACgoLCl
fwuqgXyRoDUrbjnCXY/woJ4=
=zTN/
-----END PGP SIGNATURE-----

--+sHJum3is6Tsg7/J--



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