From owner-p4-projects Mon Nov 11 12:48:38 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E5D8637B404; Mon, 11 Nov 2002 12:48:34 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D24637B401 for ; Mon, 11 Nov 2002 12:48:34 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A62743E4A for ; Mon, 11 Nov 2002 12:48:34 -0800 (PST) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gABKkGmV092121 for ; Mon, 11 Nov 2002 12:46:16 -0800 (PST) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gABKkFfK092118 for perforce@freebsd.org; Mon, 11 Nov 2002 12:46:15 -0800 (PST) Date: Mon, 11 Nov 2002 12:46:15 -0800 (PST) Message-Id: <200211112046.gABKkFfK092118@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 20974 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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