Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 54185 invoked by uid 500); 24 Jan 2002 18:09:47 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 54172 invoked from network); 24 Jan 2002 18:09:46 -0000 Date: Thu, 24 Jan 2002 10:09:50 -0800 From: Aaron Bannert To: dev@httpd.apache.org Subject: Re: cvs commit: httpd-2.0/server scoreboard.c Message-ID: <20020124100950.W16977@clove.org> Mail-Followup-To: Aaron Bannert , dev@httpd.apache.org References: <001f01c1a4f1$535f6980$5d00000a@KOJ> <013301c1a4f3$7e3427c0$8a381b09@sashimi> <20020124162901.GK28051@ebuilt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020124162901.GK28051@ebuilt.com> User-Agent: Mutt/1.3.23i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Thu, Jan 24, 2002 at 08:29:01AM -0800, Justin Erenkrantz wrote: > On Thu, Jan 24, 2002 at 11:23:39AM -0500, Bill Stoddard wrote: > > The issue is not whether we need a "file" backing the scoreboard. On Unix, you make the > > scoreboard use a file when the OS does not support shared memory. > > I think Aaron pointed out in a recent exchange with a FreeBSD user > that we don't support any OS without shared memory (FreeBSD disables > shmem in a jail). IIRC, file-backed scoreboards are no longer > supported in 2.0 (i.e. no use of shmem at all). Some OSes require > a path to "setup" the scoreboard via shmem. FWIW, this seems > identical to your issue in Win32. > > (I could be wrong, but that is my interpretation.) -- justin Actually, one of the "name-based shared memory" types on Unix is an mmap()ed file. If that is how we were doing file-backed shared memory before then it's still in there. The bigger point here is that we don't make a distinction between file-backed and non-file-backed shared memory anymore. The only distinction we have is anonymous and name-based. All name-based shmem types rely on a file in the filesystem, either to rendezvous two unrelated processes or to back (store) the actual shared data. I had thought that on platforms that supported it, we would prefer the anonymous shared memory (as we were using before) to a name-based solution, for whatever reason (performance and/or security perhaps). I have no empirical evidence claiming either to be superior, I just wanted to leave the underlying scoreboard mechanism as close as possible to what it was before the recent shmem changes. How about this: - if the user specifies a ScoreboardFile then we use name-based memory with that file, and failures are absolute. - if none is specified, we get to chose -- right now i see this as - platforms with fork try anonymous* then fall back to name-based - other platforms do name-based (for name-based we have to come up with a name like what we have now. If it happens to be on an NFS partition, then it may fail, but we'll have made notice of this in the docs and the config comments.) (*anonymous shmem should not reattach in the child) -aaron