Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 89842 invoked from network); 10 Dec 2003 14:45:01 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 10 Dec 2003 14:45:01 -0000 Received: (qmail 6165 invoked by uid 500); 10 Dec 2003 14:44:54 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 5871 invoked by uid 500); 10 Dec 2003 14:44:51 -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 5858 invoked from network); 10 Dec 2003 14:44:51 -0000 Received: from unknown (HELO prv-mail20.provo.novell.com) (137.65.81.122) by daedalus.apache.org with SMTP; 10 Dec 2003 14:44:51 -0000 Received: from INET-PRV-MTA by prv-mail20.provo.novell.com with Novell_GroupWise; Wed, 10 Dec 2003 07:44:52 -0700 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.2 Beta Date: Wed, 10 Dec 2003 07:44:40 -0700 From: "Jean-Jacques Clar" To: , Subject: Re: cvs commit: httpd-2.0/modules/experimental cache_cache.cmod_mem_cache.c Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__PartF9A71C48.0__=" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 500/1000/N This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartF9A71C48.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit >The only thing I don't understand is why this went from: > >- queue_clock - mobj->total_refs > >to: > >queue_clock - mobj->total_refs > >When the other case negated the whole statement. Is this intentional or >did you forget to account for the - in this case being distributed across >the ()'s? If you look at the patch in cache_cache.c, the value of queue_clock will now either be 0 or negative because the stored priority is negative: priority = c->get_pri(ejected); - if (c->queue_clock < priority) + if (c->queue_clock > priority) c->queue_clock = priority; And we want to have this value added as a it is to the number of reference to and object in order to increase the priority on the negative side. The new cached element will then have a value at least equal to the element that was removed from the heap. Thanks, JJ --=__PartF9A71C48.0__= Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit
>The only thing I don't understand is why this went from:
>
>- queue_clock - mobj->total_refs
>
>to:
>
>queue_clock - mobj->total_refs
>
>When the other case negated the whole statement.  Is this intentional or
>did you forget to account for the - in this case being distributed across
>the ()'s?
If you look at the patch in cache_cache.c, the value of queue_clock will
now either be 0 or negative because the stored priority is negative:
 
           priority = c->get_pri(ejected);
  
  -        if (c->queue_clock < priority)
  +        if (c->queue_clock > priority)
               c->queue_clock = priority;
And we want to have this value added as a it is to the number of
reference to and object in order to increase the priority on the negative side.
The new cached element will then have a value at least equal to the element
that was removed from the heap.
Thanks,
JJ
--=__PartF9A71C48.0__=--