From owner-freebsd-hackers Wed Feb 10 10:40:21 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA01719 for freebsd-hackers-outgoing; Wed, 10 Feb 1999 10:40:21 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA01712 for ; Wed, 10 Feb 1999 10:40:19 -0800 (PST) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.8/8.8.8) id LAA15898; Wed, 10 Feb 1999 11:42:49 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp04.primenet.com, id smtpd015858; Wed Feb 10 11:42:45 1999 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id LAA18447; Wed, 10 Feb 1999 11:39:49 -0700 (MST) From: Terry Lambert Message-Id: <199902101839.LAA18447@usr07.primenet.com> Subject: Re: portability of shm, mmap, pipes and socket IPC To: dillon@apollo.backplane.com (Matthew Dillon) Date: Wed, 10 Feb 1999 18:39:49 +0000 (GMT) Cc: tlambert@primenet.com, kuku@gilberto.physik.RWTH-Aachen.DE, hackers@FreeBSD.ORG In-Reply-To: <199902092310.PAA61722@apollo.backplane.com> from "Matthew Dillon" at Feb 9, 99 03:10:52 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > :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