Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Nov 2002 12:46:15 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 20974 for review
Message-ID:  <200211112046.gABKkFfK092118@repoman.freebsd.org>

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

Change 20974 by jhb@jhb_laptop on 2002/11/11 12:45:33

	Change consumers of WITNESS_SLEEP() to use WITNESS_WARN() instead.

Affected files ...

.. //depot/projects/smpng/sys/kern/kern_condvar.c#21 edit
.. //depot/projects/smpng/sys/kern/kern_sig.c#49 edit
.. //depot/projects/smpng/sys/kern/kern_synch.c#36 edit
.. //depot/projects/smpng/sys/kern/kern_sysctl.c#25 edit
.. //depot/projects/smpng/sys/vm/uma_core.c#21 edit

Differences ...

==== //depot/projects/smpng/sys/kern/kern_condvar.c#21 (text+ko) ====

@@ -219,7 +219,8 @@
 		ktrcsw(1, 0);
 #endif
 	CV_ASSERT(cvp, mp, td);
-	WITNESS_SLEEP(0, &mp->mtx_object);
+	WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &mp->mtx_object,
+	    "Waiting on \"%s\"", cvp->cv_description);
 	WITNESS_SAVE(&mp->mtx_object, mp);
 
 	if (cold ) {
@@ -275,7 +276,8 @@
 		ktrcsw(1, 0);
 #endif
 	CV_ASSERT(cvp, mp, td);
-	WITNESS_SLEEP(0, &mp->mtx_object);
+	WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &mp->mtx_object,
+	    "Waiting on \"%s\"", cvp->cv_description);
 	WITNESS_SAVE(&mp->mtx_object, mp);
 
 	if (cold || panicstr) {
@@ -343,7 +345,8 @@
 		ktrcsw(1, 0);
 #endif
 	CV_ASSERT(cvp, mp, td);
-	WITNESS_SLEEP(0, &mp->mtx_object);
+	WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &mp->mtx_object,
+	    "Waiting on \"%s\"", cvp->cv_description);
 	WITNESS_SAVE(&mp->mtx_object, mp);
 
 	if (cold || panicstr) {
@@ -421,7 +424,8 @@
 		ktrcsw(1, 0);
 #endif
 	CV_ASSERT(cvp, mp, td);
-	WITNESS_SLEEP(0, &mp->mtx_object);
+	WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &mp->mtx_object,
+	    "Waiting on \"%s\"", cvp->cv_description);
 	WITNESS_SAVE(&mp->mtx_object, mp);
 
 	if (cold || panicstr) {

==== //depot/projects/smpng/sys/kern/kern_sig.c#49 (text+ko) ====

@@ -1674,7 +1674,8 @@
 
 	p = td->td_proc;
 	PROC_LOCK_ASSERT(p, MA_OWNED);
-	WITNESS_SLEEP(1, &p->p_mtx.mtx_object);
+	WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &p->p_mtx.mtx_object,
+	    "Checking for signals");
 	for (;;) {
 		int traced = (p->p_flag & P_TRACED) || (p->p_stops & S_SIG);
 

==== //depot/projects/smpng/sys/kern/kern_synch.c#36 (text+ko) ====

@@ -143,7 +143,8 @@
 	if (KTRPOINT(td, KTR_CSW))
 		ktrcsw(1, 0);
 #endif
-	WITNESS_SLEEP(0, &mtx->mtx_object);
+	WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &mtx->mtx_object,
+	    "Sleeping on \"%s\"", wmesg);
 	KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL,
 	    ("sleeping without a mutex"));
 	/*

==== //depot/projects/smpng/sys/kern/kern_sysctl.c#25 (text+ko) ====

@@ -999,7 +999,8 @@
 	size_t i = 0;
 
 	if (req->lock == 1 && req->oldptr)
-		WITNESS_SLEEP(1, NULL);
+		WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
+		    "sysctl_old_user");
 	if (req->oldptr) {
 		i = l;
 		if (req->oldlen <= req->oldidx)

==== //depot/projects/smpng/sys/vm/uma_core.c#21 (text+ko) ====

@@ -1308,7 +1308,8 @@
 	if (!(flags & M_NOWAIT)) {
 		KASSERT(curthread->td_intr_nesting_level == 0,
 		   ("malloc(M_WAITOK) in interrupt context"));
-		WITNESS_SLEEP(1, NULL);
+		WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
+		    "malloc() of \"%s\"", zone->uz_name);
 	}
 
 zalloc_restart:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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