>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

Reply via email to