Subject: Re: fsync performance hit on 1.6.1
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.ORG>
From: Matt Thomas <>
List: tech-kern
Date: 07/09/2003 11:13:02
At 09:26 AM 7/9/2003, Greg A. Woods wrote:
>If you know how IEEE standards committees work and you understand how
>much they (are supposed to) hate inventing new things, the fact that
>they invented shm_open and shm_unlink() suggests that some strong
>member(s) of the comittee were just completely and totally unwilling to
>allow for mmap() to work on all normal files and that the only way they
>would be happy with mmap() becoming the true standard shared memory
>interface was if it was required that the file descriptors it used be
>allocated by some special new function.
>You would think shared memory would be simpler to describe and discuss
>than something like message queues which have lots of fancy features,
>since it is, after all, just a chunk of memory storage that can be
>mapped into the address space of multiple processes.  However because of
>this strange use of mmap() and all the qualifiers they put on it for
>POSIX, folks like Bill Gallmeister in his O'Reilly "POSIX.4" book
>actually spend more pages describing shared memory and give all kinds of
>caveats about its use.  The SysV SHM API is trivial by comparison to POSIX.

I forwarded Bill Gallmeister your message, and he gave me the following
to use as a response:

And to comment on the email thread you forwarded:  hindsight's a beautiful
thing.  shm_open et al were designed to allow a trivial implementation atop
mmap (or atop the Ludicrous Sys V Interface (TM)), but at the time we came up
with the standard, I believe it was only the rocket scientists at Sun who had
mmap--no one else had ponied up to the memory==file proposition and all its
implications.  There wasn't even an INTERNET back then, for Chrissake.  Al Gore
hadn't been BORN.  We wrote the damn standard using OIL LANTERNS.  Okay, maybe
I'm exaggerating a little.  It was a DECADE ago!

Matt Thomas               Internet:
3am Software Foundry      WWW URL:
Cupertino, CA             Disclaimer: I avow all knowledge of this message