From owner-cvs-src@FreeBSD.ORG Mon Oct 20 13:10:58 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FEC316A4B3; Mon, 20 Oct 2003 13:10:58 -0700 (PDT) Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 191A243F85; Mon, 20 Oct 2003 13:10:57 -0700 (PDT) (envelope-from alc@cs.rice.edu) Received: from localhost (localhost [127.0.0.1]) by cs.rice.edu (Postfix) with ESMTP id 9CC044AB0F; Mon, 20 Oct 2003 15:10:56 -0500 (CDT) Received: from cs.rice.edu ([127.0.0.1]) by localhost (cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16202-01-81; Mon, 20 Oct 2003 15:10:53 -0500 (CDT) Received: by cs.rice.edu (Postfix, from userid 19572) id D6E7E4A9CD; Mon, 20 Oct 2003 15:10:53 -0500 (CDT) Date: Mon, 20 Oct 2003 15:10:53 -0500 From: Alan Cox To: Scott Long Message-ID: <20031020201053.GL20658@cs.rice.edu> References: <200310200848.aa99929@salmon.maths.tcd.ie> <20031020095412.F49719@pooker.samsco.home> <20031020101425.H49719@pooker.samsco.home> <20031020135441.S50707@pooker.samsco.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031020135441.S50707@pooker.samsco.home> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavis-20030616-p5 at rice.edu cc: David Malone cc: "Alan L. Cox" cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/streams streams.c src/sys/kernkern_descrip.c kern_event.c sys_pipe.c uipc_syscalls.cvfs_syscalls.c src/sys/opencrypto cryptodev.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2003 20:10:58 -0000 On Mon, Oct 20, 2003 at 01:58:08PM -0600, Scott Long wrote: > On Mon, 20 Oct 2003, Scott Long wrote: > > > > > > On Mon, 20 Oct 2003, Scott Long wrote: > > > > > On Mon, 20 Oct 2003, David Malone wrote: > > > > > > This reminds me that we still hold Giant around pipe(2) because it isn't > > > > > > declared MPSAFE in the syscall table. Is this still necessary? > > > > > > > > > I've been suspicious of this too, and I was hoping that you would have > > > > > an answer. Can we go ahead and correct this? > > > > > > > > I think we may need to check the calling of pipeclose() in pipe(), > > > > but as this is only done in an error case, it is probably safe enough > > > > to just grab Giant for that. (The mac_* calls may need to be checked > > > > too). > > > > > > pipeclose() seems to have some concept of locking, though I don't know > > > what the implications are of it saying, 'gee, the mutex on this pipe was > > > never initialized, so I just won't worry about locking.' Towards the > > > end of pipeclose() Giant is acquired, though that action is likely no > > > longer needed either. > > > > Nix that last part, I was looking at a stale file. pipeclose() does not > > explicitely grab Gaint. > > > > Scott > > > > > > I've run several buildworlds while doing background pipe tests, all > without any problems with WITNESS and INVARIANTS enabled on a fast SMP > machine. I can't report any performance change since I'm only testing > correctness now, but it looks promising. I'd advise to go ahead and > throw the switch on this. > This only changes the creation of pipes. Thus, I wouldn't expect an observable difference. I believe that the actual use of pipes has been free of Giant for some time. (In truth, there is a small bit of pmap-level code that still acquires Giant.) Alan