Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jun 2012 23:43:34 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Steven Haber <steven.haber@isilon.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Geom / destroy_dev() deadlock
Message-ID:  <20120611204334.GH2337@deviant.kiev.zoral.com.ua>
In-Reply-To: <56CE86D6660FF84498426FA7A33170B4033672EF@seaxch01.desktop.isilon.com>
References:  <56CE86D6660FF84498426FA7A33170B4033672EF@seaxch01.desktop.isilon.com>

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

--wj9ZLJVQDRFjGSdK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jun 11, 2012 at 10:19:07AM -0700, Steven Haber wrote:
> Hey FreeBSD devs,
>=20
> I hope this is the right forum for this. I haven't used the FreeBSD
> mailing lists before. I'm a relatively new hire at EMC Isilon. We are
> using FreeBSD 7.0 as the basis for our scale-out NAS product line. We
> are frequently hitting the deadlock described here:
>=20
> http://lists.freebsd.org/pipermail/freebsd-geom/2010-February/003888.htm
> l
>=20
> The race is that destroy_dev() sleeps indefinitely waiting for thread
> references to drop from a dev. In the case of geom, we hold the topology
> lock the whole time we're in the dev layer. In devfs_open() and
> devfs_close(), we take a ref on the dev before calling into to geom.
>=20
> The proposed solution of destroy_dev_sched() makes sense to me. I am
> trying to understand the necessity of Alexander Motin's additional
> changes. destroy_dev_tq() holds the devmtx during the destroy and devfs
> uses this lock to take refs before calling into geom. To me it seems we
> should be able to protect the cdev with just the devmtx, provided
> consumers of d_close(), d_open(), etc. ref and rel the dev
> appropriately.
devmtx is mutex. If taken, then cdevsw methods would be unable to sleep.

--wj9ZLJVQDRFjGSdK
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iEYEARECAAYFAk/WWHUACgkQC3+MBN1Mb4ip4QCgg1nSt1hXHR3ef0jlEtVv9iQa
GgYAnj2nwSOtFkYgJogIG0ErN5gJfvBI
=ikZO
-----END PGP SIGNATURE-----

--wj9ZLJVQDRFjGSdK--



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