Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Feb 1999 18:39:49 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        dillon@apollo.backplane.com (Matthew Dillon)
Cc:        tlambert@primenet.com, kuku@gilberto.physik.RWTH-Aachen.DE, hackers@FreeBSD.ORG
Subject:   Re: portability of shm, mmap, pipes and socket IPC
Message-ID:  <199902101839.LAA18447@usr07.primenet.com>
In-Reply-To: <199902092310.PAA61722@apollo.backplane.com> from "Matthew Dillon" at Feb 9, 99 03:10:52 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> :FreeBSD has a unified vm and buffer cache.  In theory, you do not
> :	need to call msync(2), ever, on such a system.  However,
> :	there are a number of coherency bugs that make it necessary
> :	to call it (mostly in INN-type situations, where the file is
> :	being extended while it is mapped).
> 
>     What coherency bugs?  As far as I know, extending a mmap()'d file
>     works just fine.  You cannot *write* into the mmap()'d area beyond
>     the end of a file until you ftruncate() the file larger, but that is
>     true on all implementations that I know of.  It is also appropriate -
>     the validity of the mmap()'d data only extends to the logical end of
>     file.

Yes, yes, that's not the problem.

The problem is that INN apparently still fails when using mmap without
msync.  The utility of msync is overrated; the code does not actually
do what the manual page claims it does, in any case.

> :FreeBSD semaphores are inadequately resource tracked in _exit().
> 
>     All semaphores are inadequately resource tracked in _exit(), it's a
>     problem inherited from the SYSV implementation.

Shared memory is badly tracked.  But semaphores are supposed to be
capable of being counted out by _exit(), per the SysV man pages
for semop(2) an exit(2):

http://www.freebsd.org/cgi/man.cgi?query=semop&sektion=2&apropos=0&manpath=SunOS+5.5.1
http://www.freebsd.org/cgi/man.cgi?query=exit&sektion=2&apropos=0&manpath=SunOS+5.5.1

FreeBSD either doesn't do this, or the FreeBSD manual pages are in error.


					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-hackers" in the body of the message



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