httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: httpd-2.0/server/mpm/worker fdqueue.c fdqueue.h
Date Wed, 19 Sep 2001 01:01:35 GMT
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.

>...
>   --- 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:

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.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message