From owner-cvs-all@FreeBSD.ORG Mon Oct 4 16:31:48 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7840116A4CF for ; Mon, 4 Oct 2004 16:31:48 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2910843D48 for ; Mon, 4 Oct 2004 16:31:48 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 3599 invoked from network); 4 Oct 2004 16:31:47 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 4 Oct 2004 16:31:47 -0000 Received: from [10.50.40.210] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i94GVbAo057248; Mon, 4 Oct 2004 12:31:38 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: David Schultz Date: Mon, 4 Oct 2004 12:29:43 -0400 User-Agent: KMail/1.6.2 References: <200410010501.i9151US7086474@repoman.freebsd.org> <200410041034.32221.jhb@FreeBSD.org> <20041004153854.GA14022@VARK.MIT.EDU> In-Reply-To: <20041004153854.GA14022@VARK.MIT.EDU> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410041229.43350.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_fork.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2004 16:31:48 -0000 On Monday 04 October 2004 11:38 am, David Schultz wrote: > On Mon, Oct 04, 2004, John Baldwin wrote: > > On Friday 01 October 2004 01:01 am, David Schultz wrote: > > > das 2004-10-01 05:01:29 UTC > > > > > > FreeBSD src repository > > > > > > Modified files: > > > sys/kern kern_fork.c > > > Log: > > > Avoid calling _PHOLD(p1) with p2's lock held, since _PHOLD() > > > may block to swap in p1. Instead, call _PHOLD earlier, at a > > > point where the only lock held happens to be p1's. > > > > FWIW, I don't think this can actually happen because curthread belonging > > to p1 is executing and it wouldn't be executing unless it was swapped in, > > so I don't think that PHOLD could ever have blocked. > > Yes, you're right. I'll revert this one. Shall I also change the > _PHOLD() into simply p1->p_lock++ (and similarly for _PRELE()) to > avoid the useless test? Nah, I would just leave it as _PHOLD() since it's easier when reading the code to see the matching pair. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org