From owner-freebsd-bugs@FreeBSD.ORG Sun Sep 23 11:00:23 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA1E6106564A for ; Sun, 23 Sep 2012 11:00:23 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AA3C68FC08 for ; Sun, 23 Sep 2012 11:00:23 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q8NB0N4U041947 for ; Sun, 23 Sep 2012 11:00:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q8NB0NvT041937; Sun, 23 Sep 2012 11:00:23 GMT (envelope-from gnats) Date: Sun, 23 Sep 2012 11:00:23 GMT Message-Id: <201209231100.q8NB0NvT041937@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Fabian Keil Cc: Subject: Re: kern/171865: [geom] g_wither_washer() keeping a core busy X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Fabian Keil List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2012 11:00:24 -0000 The following reply was made to PR kern/171865; it has been noted by GNATS. From: Fabian Keil To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/171865: [geom] g_wither_washer() keeping a core busy Date: Sun, 23 Sep 2012 12:56:23 +0200 --Sig_/KU5E65A_olXP4OejkTDNCQi Content-Type: multipart/mixed; boundary="MP_/v14wCMsERAWZ+BN5MCnuOBj" --MP_/v14wCMsERAWZ+BN5MCnuOBj Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline The attached patch actually applies against a vanilla tree. Fabian --MP_/v14wCMsERAWZ+BN5MCnuOBj Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-Allow-to-use-kern.geom.debugflags-to-prevent-g_run_e.diff =46rom 86f9c2e1f3c49a1f3b699091521e97c268c0e8a5 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 12 Jul 2012 12:38:00 +0200 Subject: [PATCH] Allow to use kern.geom.debugflags to prevent g_run_events() from calling g_wither_washer() Workaround for geom keeping a whole core busy failing to remove a lost device. --- sys/geom/geom_event.c | 3 +++ sys/geom/geom_int.h | 1 + 2 files changed, 4 insertions(+) diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index e3b5261..7491bc3 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD: src/sys/geom/geom_event.c,v 1.62 2012= /07/29 11:51:48 mav Exp #include #include #include +#include #include #include #include @@ -281,6 +282,8 @@ g_run_events() ; mtx_assert(&g_eventlock, MA_OWNED); i =3D g_wither_work; + if (g_debugflags & G_F_STOP_WITHERING) + i =3D 0; if (i) { mtx_unlock(&g_eventlock); while (i) { diff --git a/sys/geom/geom_int.h b/sys/geom/geom_int.h index 50f3a2a..0c11be8 100644 --- a/sys/geom/geom_int.h +++ b/sys/geom/geom_int.h @@ -50,6 +50,7 @@ extern int g_debugflags; */ #define G_F_DISKIOCTL 64 #define G_F_CTLDUMP 128 +#define G_F_STOP_WITHERING 256 =20 /* geom_dump.c */ void g_confxml(void *, int flag); --=20 1.7.11.5 --MP_/v14wCMsERAWZ+BN5MCnuOBj-- --Sig_/KU5E65A_olXP4OejkTDNCQi Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBe6ukACgkQSMVSH78upWPNlgCgggUNpxSe71/g7mMol0cDU1+6 rgUAn0u3axvgaA+dkbHFPs/NMVlPobMt =lsto -----END PGP SIGNATURE----- --Sig_/KU5E65A_olXP4OejkTDNCQi--