From owner-p4-projects Thu Jun 6 8:17:35 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 23F3F37B403; Thu, 6 Jun 2002 08:17:28 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A600C37B405 for ; Thu, 6 Jun 2002 08:17:27 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g56FHRk65330 for perforce@freebsd.org; Thu, 6 Jun 2002 08:17:27 -0700 (PDT) (envelope-from jhb@freebsd.org) Date: Thu, 6 Jun 2002 08:17:27 -0700 (PDT) Message-Id: <200206061517.g56FHRk65330@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 12427 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://people.freebsd.org/~peter/p4db/chv.cgi?CH=12427 Change 12427 by jhb@jhb_laptop on 2002/06/06 08:17:18 Don't call printf while holding a spin lock. Hopefully this will fix the SMP hang with witness when exiting single user mode. Actually, since the text that was printed was "de" before the hang, I'm fairly sure this will fix the problem in question. Affected files ... ... //depot/projects/smpng/sys/kern/subr_witness.c#51 edit Differences ... ==== //depot/projects/smpng/sys/kern/subr_witness.c#51 (text+ko) ==== @@ -383,9 +383,9 @@ mtx_lock_spin(&w_mtx); MPASS(w->w_refcount > 0); w->w_refcount--; + mtx_unlock_spin(&w_mtx); if (w->w_refcount == 0) printf("dead witness: %s\n", w->w_name); - mtx_unlock_spin(&w_mtx); } mtx_lock(&all_mtx); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message