Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 May 2008 17:40:11 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 142639 for review
Message-ID:  <200805311740.m4VHeBSI052455@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142639

Change 142639 by jhb@jhb_mutex on 2008/05/31 17:39:16

	Move some patches off of my laptop's /sys:
	- Put []'s around kernel processes' command name like ps(1)
	- #if 0 some dubious callout munging in kbdmux(4)
	- Don't explicitly drop Giant in the udf filesystem.  Usually
	  this isn't really needed (at this point udf should be made
	  MPSAFE instead) and it breaks the module ABI since udf.ko
	  depends on WITNESS.

Affected files ...

.. //depot/projects/smpng/sys/ddb/db_ps.c#41 edit
.. //depot/projects/smpng/sys/dev/kbdmux/kbdmux.c#8 edit
.. //depot/projects/smpng/sys/fs/udf/udf_vfsops.c#38 edit

Differences ...

==== //depot/projects/smpng/sys/ddb/db_ps.c#41 (text+ko) ====

@@ -189,13 +189,19 @@
 		if (cred != NULL && jailed(cred))
 			strlcat(state, "J", sizeof(state));
 		db_printf(" %-6.6s ", state);
-		if (p->p_flag & P_HADTHREADS)
+		if (p->p_flag & P_HADTHREADS) {
 #ifdef __LP64__
-			db_printf(" (threaded)                  %s\n",
-			    p->p_comm);
+			db_printf(" (threaded)                  ");
 #else
-			db_printf(" (threaded)          %s\n", p->p_comm);
+			db_printf(" (threaded)          ");
 #endif
+			if (p->p_flag & P_SYSTEM)
+				db_printf("[");
+			db_printf("%s", p->p_comm);
+			if (p->p_flag & P_SYSTEM)
+				db_printf("]");
+			db_printf("\n");
+		}
 		FOREACH_THREAD_IN_PROC(p, td) {
 			dumpthread(p, td, p->p_flag & P_HADTHREADS);
 			if (db_pager_quit)

==== //depot/projects/smpng/sys/dev/kbdmux/kbdmux.c#8 (text+ko) ====

@@ -196,6 +196,7 @@
 
 	KBDMUX_LOCK_ASSERT(state, MA_OWNED);
 
+#if 0
 	if (callout_pending(&state->ks_timo))
 		return; /* callout was reset */
 
@@ -203,6 +204,7 @@
 		return; /* callout was stopped */
 
 	callout_deactivate(&state->ks_timo);
+#endif
 
 	/* queue interrupt task if needed */
 	if (state->ks_inq.c_cc > 0 && !(state->ks_flags & TASK) &&

==== //depot/projects/smpng/sys/fs/udf/udf_vfsops.c#38 (text+ko) ====

@@ -319,11 +319,9 @@
 	struct g_consumer *cp;
 	struct bufobj *bo;
 
-	DROP_GIANT();
 	g_topology_lock();
 	error = g_vfs_open(devvp, &cp, "udf", 0);
 	g_topology_unlock();
-	PICKUP_GIANT();
 	VOP_UNLOCK(devvp, 0);
 	if (error)
 		return error;
@@ -363,11 +361,9 @@
 
 	if (((logical_secsize % cp->provider->sectorsize) != 0) ||
 	    (logical_secsize < cp->provider->sectorsize)) {
-		DROP_GIANT();
 		g_topology_lock();
 		g_vfs_close(cp, td);
 		g_topology_unlock();
-		PICKUP_GIANT();
 		return (EINVAL);
 	}
 
@@ -491,11 +487,9 @@
 		FREE(udfmp, M_UDFMOUNT);
 	if (bp != NULL)
 		brelse(bp);
-	DROP_GIANT();
 	g_topology_lock();
 	g_vfs_close(cp, td);
 	g_topology_unlock();
-	PICKUP_GIANT();
 	return error;
 };
 
@@ -522,11 +516,9 @@
 #endif
 	}
 
-	DROP_GIANT();
 	g_topology_lock();
 	g_vfs_close(udfmp->im_cp, td);
 	g_topology_unlock();
-	PICKUP_GIANT();
 	vrele(udfmp->im_devvp);
 
 	if (udfmp->s_table != NULL)



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