Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Oct 2000 00:22:37 -0700 (PDT)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Terry Lambert <tlambert@primenet.com>
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
Message-ID:  <200010050722.e957MbF33401@earth.backplane.com>
References:   <200010050458.VAA07440@usr07.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
:> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010050722.e957MbF33401>