From owner-cvs-all Mon Feb 18 9:28:30 2002 Delivered-To: cvs-all@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id D2D3337B404; Mon, 18 Feb 2002 09:28:19 -0800 (PST) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.11.6/8.11.5) with SMTP id g1IHSDD83581; Mon, 18 Feb 2002 12:28:13 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Mon, 18 Feb 2002 12:28:13 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Matthew Dillon Cc: Poul-Henning Kamp , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern kern_time.c In-Reply-To: <200202181715.g1IHFGU15223@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 18 Feb 2002, Matthew Dillon wrote: > That's what those gettimeofday() benchmarks I posted were testing. Sorry, I must have missed this: I was looking for before/after benchmarks from phk's commit. > In anycase, some of the simpler system calls are already out from > under giant, like getpagesize(). A number of these were not performance-sensitive in the way tha gettimeofday() is. > Three classes of system calls will soon be out from under Giant: > > * system calls that retrieve information from ucred. With Julian's > latest patch, the ucred is now safe in the thread so these system > calls can access it rather then the less-safe ucred in the proc > structure. These will not be instrumented, they will simply > access the information. John has a rather large patch in his jhb_proc branch that does precisely this. I hope he can commit this soon. Note that you do have to be a little careful here: it is necessary to use p_ucred under several circumstances (such as during updates) so as to get proper consistency (i.e., changes must be authorized using the Real Process Credential). In practice this means there are frequently three valid credentials for authorization: process, thread, and cached object. Mostly, we'll use thread or cached object. > * system calls that retrieve information from the proc, like > getpid(), will soon be out from under giant or be able to just use > the PROC_LOCK. These will be instrumented with the kern.giant.proc > sysctl. Sounds good. John also has patches, I believe, that pull some signal operations out: thinks like get/setsigmask() being out from Giant should also have a good performance improvement for userland threading applications. > * system calls that mess around with file descriptors and struct > file's (Alfred's work), that do not have to push into the > fileops, are coming along. I'm going to be messing with fileops > after I finish messing with the ucred stuff. Sounds good. > In the syscall path itself we need to clean up the Giant acquisition > done in the syscall trap (that's why we want to not have to crfree() > the thread's ucred structure after each syscall), userret() (signal > checking), and perhaps a few other places. John may already have patches for this. Please make sure you synchronize with him on this work. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message