From owner-freebsd-geom@FreeBSD.ORG Wed Feb 4 05:38:12 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CD5B16A4CE for ; Wed, 4 Feb 2004 05:38:12 -0800 (PST) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20B8F43D2F for ; Wed, 4 Feb 2004 05:38:09 -0800 (PST) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 37F213ABB75; Wed, 4 Feb 2004 14:40:03 +0100 (CET) Date: Wed, 4 Feb 2004 14:40:03 +0100 From: Pawel Jakub Dawidek To: Poul-Henning Kamp Message-ID: <20040204134003.GG14639@garage.freebsd.pl> References: <20040126161300.GJ565@garage.freebsd.pl> <66984.1075133737@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+sHJum3is6Tsg7/J" Content-Disposition: inline In-Reply-To: <66984.1075133737@critter.freebsd.dk> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 4.8-RELEASE-p13 i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: Lukas Ertl cc: freebsd-geom@freebsd.org Subject: Re: Preventing deadlocks on the event queue. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2004 13:38:12 -0000 --+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--