Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 24015 invoked by uid 6000); 17 Nov 1997 21:10:32 -0000 Received: (qmail 24009 invoked from network); 17 Nov 1997 21:10:31 -0000 Received: from twinlark.arctic.org (305@204.62.130.91) by taz.hyperreal.org with SMTP; 17 Nov 1997 21:10:31 -0000 Received: (qmail 13571 invoked by uid 500); 17 Nov 1997 21:11:34 -0000 Date: Mon, 17 Nov 1997 13:11:34 -0800 (PST) From: Dean Gaudet To: "'new-httpd@apache.org'" Subject: RE: [BUG] Solaris mmap In-Reply-To: <40893B5F9118D11183EE00A0249C25301C6E73@gensym-nt2.gensym.com> Message-ID: Legal: "Copyright (c) 1997 Dean Gaudet, all rights reserved. Visit http://www.arctic.org/~dgaudet/legal for more information." Organization: Transmeta Corp. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org Yeah, why the heck didn't I do it this way in the first place ... something about block_alarms() while writing a log message must have bugged me, but it doesn't bug me right now. +1 Dean On Mon, 17 Nov 1997, Ben Hyde wrote: > Move mmap error checking adjacent to the call, to assure it stay > in synch with the predicate that attempts the mmap. > > /apachen/src/main:272> cvs diff -u http_core.c > Index: http_core.c > =================================================================== > RCS file: /cvs/apachen/src/main/http_core.c,v > retrieving revision 1.140 > diff -u -r1.140 http_core.c > --- http_core.c 1997/11/15 00:16:50 1.140 > +++ http_core.c 1997/11/17 20:35:02 > @@ -1868,17 +1868,16 @@ > * file mmapped */ > mm = mmap (NULL, r->finfo.st_size, PROT_READ, MAP_PRIVATE, > fileno(f), 0); > + if ((caddr_t)-1) { > + aplog_error(APLOG_MARK, APLOG_CRIT, r->server, > + "mmap_handler: mmap failed: %s", r->filename); > + } > } else { > mm = (caddr_t)-1; > } > > if (mm == (caddr_t)-1) { > unblock_alarms(); > - > - if (r->finfo.st_size >= MMAP_THRESHOLD) { > - aplog_error(APLOG_MARK, APLOG_CRIT, r->server, > - "mmap_handler: mmap failed: %s", r->filename); > - } > #endif > > if (d->content_md5 & 1) { > > > > -----Original Message----- > > From: Dean Gaudet [SMTP:dgaudet@arctic.org] > > Sent: Monday, November 17, 1997 11:16 AM > > To: new-httpd@apache.org > > Subject: Re: [BUG] Solaris mmap > > > > Looks like another logic error related to the performance patch from > > Ben > > Hyde. default_handler should have a "mmap_attempted" boolean which is > > used to decide when to issue the mmap failed message. > > > > and mmap_handler should be changed to default_handler. > > > > Not a showstopper imho. > > > > Dean > > > > On Mon, 17 Nov 1997, Lars Eilebrecht wrote: > > > > > Hi, > > > > > > Using a current 1.3b3-dev on Solaris 2.4 gives me > > > > > > (0)Error 0: mmap_handler: mmap failed > > > > > > on HEAD requests (static files). GET requests seem to work > > > without any problems. > > > > > > > > > ciao... > > > -- > > > Lars Eilebrecht - "Keep computers away from windows" > > > > > sfx@unix-ag.org (Garfinkel/Spafford: Practical Unix & > > Internet Security) > > > >