httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <>
Subject Re: cvs commit: httpd-2.0/server scoreboard.c
Date Thu, 24 Jan 2002 18:09:50 GMT
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
> > 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)


View raw message