From owner-freebsd-arch Wed Oct 4 21:59:14 2000 Delivered-To: freebsd-arch@freebsd.org Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (Postfix) with ESMTP id 1E3F937B66C; Wed, 4 Oct 2000 21:59:13 -0700 (PDT) Received: (from daemon@localhost) by smtp04.primenet.com (8.9.3/8.9.3) id VAA25603; Wed, 4 Oct 2000 21:56:24 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp04.primenet.com, id smtpdAAAzzaqUX; Wed Oct 4 21:56:13 2000 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id VAA07440; Wed, 4 Oct 2000 21:58:43 -0700 (MST) From: Terry Lambert Message-Id: <200010050458.VAA07440@usr07.primenet.com> Subject: Re: Mutexes and semaphores To: bde@zeta.org.au (Bruce Evans) Date: Thu, 5 Oct 2000 04:58:43 +0000 (GMT) Cc: dillon@earth.backplane.com (Matt Dillon), peter@netplex.com.au (Peter Wemm), cp@bsdi.com (Chuck Paterson), bright@wintelcom.net (Alfred Perlstein), jhb@FreeBSD.ORG (John Baldwin), arch@FreeBSD.ORG, jdp@polstra.com (John Polstra), eischen@vigrid.com (Daniel Eischen), grog@lemis.com (Greg Lehey) In-Reply-To: from "Bruce Evans" at Oct 05, 2000 12:40:16 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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. Well screw that, that's not the way to win getppid() benchmarks! The real way to cheat is to double map a read-only page into user space from kernel space, and have it just dereference a pid_t * into the relevent page. I even know a UNIX that did this, once upon a time... Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message