httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: cvs commit: httpd-2.0/server/mpm/worker fdqueue.c fdqueue.h
Date Wed, 19 Sep 2001 01:33:14 GMT
On Tue, Sep 18, 2001 at 06:01:35PM -0700, Greg Stein wrote:
> On Tue, Sep 18, 2001 at 11:09:12PM -0000, rbb@apache.org wrote:
> > rbb         01/09/18 16:09:12
> > 
> >   Modified:    .        CHANGES
> >                server/mpm/worker fdqueue.c fdqueue.h
> >   Log:
> >   Turn the worker MPM's queue into a LIFO.  This may
> >   improve cache-hit performance under some conditions.
> >   
> >   Submitted by:   Aaron Bannert <aaron@clove.org>
> 
> If you're just using a tail and LIFO, then this is more like a stack.

You are correct, it is really a stack, but in worker (and the filename)
it is still called a queue and it serves the same purpose. If someone wants
to rename it that's fine with me.

> >...
> >   --- fdqueue.c	2001/09/18 21:14:18	1.6
> >   +++ fdqueue.c	2001/09/18 23:09:12	1.7
> >   @@ -73,7 +73,6 @@
> >     */
> >    static int ap_queue_empty(fd_queue_t *queue)
> >    {
> >   -    /*return (queue->head == queue->tail);*/
> >        return (queue->blanks >= queue->bounds - 1);
> 
> What are ->blanks and ->bounds for? The test is easier done as:

remnants of when fdqueue was more complicated and offered more functions.

> return queue->tail == 0;
> 
> Toss ->blanks and rename ->bounds as size or capacity or something. It is
> only an upper-bound, so "bounds" isn't quite right semantically.

I've been had for name changes in the past, so I opted for the least changes
to reach correctness. As soon as these other major worker changes start
settling down, I'll definately go through and do names changes and minor
format fixes where appropriate for posterity.

-aaron

Mime
View raw message