svn commit: r331295 - head/sys/kern

Warner Losh imp at FreeBSD.org
Wed Mar 21 14:47:02 UTC 2018


Author: imp
Date: Wed Mar 21 14:46:59 2018
New Revision: 331295
URL: https://svnweb.freebsd.org/changeset/base/331295

Log:
  bufshutdown is no longer called with Giant held, so there's no need to
  drop or pickup Giant anymore. Remove that code and adjust comments.

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c	Wed Mar 21 14:46:54 2018	(r331294)
+++ head/sys/kern/vfs_bio.c	Wed Mar 21 14:46:59 2018	(r331295)
@@ -1376,25 +1376,20 @@ bufshutdown(int show_busybufs)
 
 #ifdef PREEMPTION
 		/*
-		 * Drop Giant and spin for a while to allow
-		 * interrupt threads to run.
+		 * Spin for a while to allow interrupt threads to run.
 		 */
-		DROP_GIANT();
 		DELAY(50000 * iter);
-		PICKUP_GIANT();
 #else
 		/*
-		 * Drop Giant and context switch several times to
-		 * allow interrupt threads to run.
+		 * Context switch several times to allow interrupt
+		 * threads to run.
 		 */
-		DROP_GIANT();
 		for (subiter = 0; subiter < 50 * iter; subiter++) {
 			thread_lock(curthread);
 			mi_switch(SW_VOL, NULL);
 			thread_unlock(curthread);
 			DELAY(1000);
 		}
-		PICKUP_GIANT();
 #endif
 	}
 	printf("\n");


More information about the svn-src-head mailing list