kern/171865: [geom] g_wither_washer() keeping a core busy
Fabian Keil
fk at fabiankeil.de
Sun Sep 23 11:00:24 UTC 2012
The following reply was made to PR kern/171865; it has been noted by GNATS.
From: Fabian Keil <fk at fabiankeil.de>
To: bug-followup at 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 <fk at fabiankeil.de>
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 <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
+#include <sys/sysctl.h>
#include <sys/proc.h>
#include <sys/errno.h>
#include <sys/time.h>
@@ -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--
More information about the freebsd-bugs
mailing list