From owner-freebsd-arch Wed Oct 4 19:37:13 2000 Delivered-To: freebsd-arch@freebsd.org Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id 41BED37B66C for ; Wed, 4 Oct 2000 19:37:08 -0700 (PDT) Received: (qmail 22071 invoked from network); 5 Oct 2000 02:37:03 -0000 Received: from unknown (HELO bde.zeta.org.au) (203.2.228.102) by gidora.zeta.org.au with SMTP; 5 Oct 2000 02:37:03 -0000 Date: Thu, 5 Oct 2000 13:36:57 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Alfred Perlstein Cc: Matt Dillon , Peter Wemm , Chuck Paterson , John Baldwin , arch@FreeBSD.ORG, John Polstra , Daniel Eischen , Greg Lehey Subject: Re: Mutexes and semaphores In-Reply-To: <20001004184559.Q27736@fw.wintelcom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 4 Oct 2000, Alfred Perlstein wrote: > * Bruce Evans [001004 18:40] wrote: > > This seems to be only to win getppid() benchmarks. Complications like it > > might be justified in inner loops of syscalls that are called somewhat > > more than once at most in normal programs. It's too hard to do things > > this in the thousands of places that would be necessary to get a uniform > > speedup. > > the idea is to reduce inter-cpu communication, lock-less systems are a > terrific idea but hard to get right, we have two choices: > > 1) do it right and _not_ cause extra lock/cpu/bus contention > 2) do it right and cause extra lock/cpu/bus contention 3) Do it right and make it work before you make it faster. Optimizing getppid() is instructive but not very useful. Look at how much work it takes to optimize one apparently-trivial line of code. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message