From owner-freebsd-arch Thu Oct 5 0:22:54 2000 Delivered-To: freebsd-arch@freebsd.org Received: from earth.backplane.com (placeholder-dcat-1076843290.broadbandoffice.net [64.47.83.26]) by hub.freebsd.org (Postfix) with ESMTP id CA20F37B66C; Thu, 5 Oct 2000 00:22:52 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.0/8.9.3) id e957MbF33401; Thu, 5 Oct 2000 00:22:37 -0700 (PDT) (envelope-from dillon) Date: Thu, 5 Oct 2000 00:22:37 -0700 (PDT) From: Matt Dillon Message-Id: <200010050722.e957MbF33401@earth.backplane.com> To: Terry Lambert Cc: bde@zeta.org.au (Bruce Evans), 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) Subject: Re: Mutexes and semaphores References: <200010050458.VAA07440@usr07.primenet.com> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :> 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... Heh. no syscall overhead at all, but that does introduce forward/backwards version compatibility problems. Another solution is to have the kernel double-map the system call function table and have userland call the indexed function directly. This would allow the system to implement some 'system calls' entirely in userland which could then access the shared memory map without introducing any forward or backwards compatibility issues. I used this trick in several of the embedded OS's I've done over the years. Who gives a fart about getpid() ... now time() is a function that would benefit greatly from a globally shared userland read-only page! -Matt : : Terry Lambert : terry@lambert.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message