From owner-p4-projects Mon Nov 11 15:22:20 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9EBB337B404; Mon, 11 Nov 2002 15:22:16 -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 19CD737B401; Mon, 11 Nov 2002 15:22:16 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5683343E3B; Mon, 11 Nov 2002 15:22:15 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.4/8.12.4) with SMTP id gABNLbOo000430; Mon, 11 Nov 2002 18:21:38 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Mon, 11 Nov 2002 18:21:37 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: John Baldwin Cc: Perforce Change Reviews Subject: Re: PERFORCE change 20974 for review In-Reply-To: <200211112046.gABKkFfK092118@repoman.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Ah, great, thanks! I'll pick this up for use with the MAC Framework with our new condition variable code when we IFC it in from the main tree. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories On Mon, 11 Nov 2002, John Baldwin wrote: > 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