Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2016 08:22:21 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300287 - head/sys/geom
Message-ID:  <201605200822.u4K8MLHp018554@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri May 20 08:22:20 2016
New Revision: 300287
URL: https://svnweb.freebsd.org/changeset/base/300287

Log:
  Remove asserts that Giant is not held on entrance into geom KPI, which
  outlived their usefulness.  This allows to remove drop/pickup Giant
  wrappers around GEOM calls.
  
  Discussed with:	alfred, imp, phk
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/geom/geom.h
  head/sys/geom/geom_event.c
  head/sys/geom/geom_kern.c

Modified: head/sys/geom/geom.h
==============================================================================
--- head/sys/geom/geom.h	Fri May 20 07:18:33 2016	(r300286)
+++ head/sys/geom/geom.h	Fri May 20 08:22:20 2016	(r300287)
@@ -371,7 +371,6 @@ g_free(void *ptr)
 
 #define g_topology_lock() 					\
 	do {							\
-		mtx_assert(&Giant, MA_NOTOWNED);		\
 		sx_xlock(&topology_lock);			\
 	} while (0)
 

Modified: head/sys/geom/geom_event.c
==============================================================================
--- head/sys/geom/geom_event.c	Fri May 20 07:18:33 2016	(r300286)
+++ head/sys/geom/geom_event.c	Fri May 20 08:22:20 2016	(r300287)
@@ -83,7 +83,6 @@ g_waitidle(void)
 {
 
 	g_topology_assert_not();
-	mtx_assert(&Giant, MA_NOTOWNED);
 
 	mtx_lock(&g_eventlock);
 	while (!TAILQ_EMPTY(&g_events))

Modified: head/sys/geom/geom_kern.c
==============================================================================
--- head/sys/geom/geom_kern.c	Fri May 20 07:18:33 2016	(r300286)
+++ head/sys/geom/geom_kern.c	Fri May 20 08:22:20 2016	(r300287)
@@ -90,7 +90,6 @@ static void
 g_up_procbody(void *arg)
 {
 
-	mtx_assert(&Giant, MA_NOTOWNED);
 	thread_lock(g_up_td);
 	sched_prio(g_up_td, PRIBIO);
 	thread_unlock(g_up_td);
@@ -103,7 +102,6 @@ static void
 g_down_procbody(void *arg)
 {
 
-	mtx_assert(&Giant, MA_NOTOWNED);
 	thread_lock(g_down_td);
 	sched_prio(g_down_td, PRIBIO);
 	thread_unlock(g_down_td);
@@ -116,7 +114,6 @@ static void
 g_event_procbody(void *arg)
 {
 
-	mtx_assert(&Giant, MA_NOTOWNED);
 	thread_lock(g_event_td);
 	sched_prio(g_event_td, PRIBIO);
 	thread_unlock(g_event_td);



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