httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rede...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental cache_cache.c mod_mem_cache.c
Date Thu, 05 Feb 2004 19:08:37 GMT
rederpj     2004/02/05 11:08:37

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS
               modules/experimental Tag: APACHE_2_0_BRANCH cache_cache.c
                        mod_mem_cache.c
  Log:
  *) Fixed cache-removal order in mod_mem_cache.
  
  Submitted by: Jean-Jacques Clar, Cliff Woolley
  Reviewed by: jwoolley, bnicholes, rederpj
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.237 +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.236
  retrieving revision 1.988.2.237
  diff -u -r1.988.2.236 -r1.988.2.237
  --- CHANGES	5 Feb 2004 18:41:57 -0000	1.988.2.236
  +++ CHANGES	5 Feb 2004 19:08:36 -0000	1.988.2.237
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.49
   
  +  *) Fixed cache-removal order in mod_mem_cache.
  +     [Jean-Jacques Clar, Cliff Woolley]
  +
     *) mod_setenvif: Fix the regex optimizer, which under circumstances
        treated the supplied regex as literal string. PR 24219.
        [André Malo]
  
  
  
  1.751.2.682 +1 -6      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.681
  retrieving revision 1.751.2.682
  diff -u -r1.751.2.681 -r1.751.2.682
  --- STATUS	5 Feb 2004 18:41:58 -0000	1.751.2.681
  +++ STATUS	5 Feb 2004 19:08:36 -0000	1.751.2.682
  @@ -241,11 +241,6 @@
   	  bnicholes (looks good on Netware but then NetWare does not
   	             use shared memory.)
   
  -    * Fix mod_mem_cache removal ordering bug.
  -        modules/experimental/mod_mem_cache.c r1.97,1.99
  -        modules/experimental/cache_cache.c r1.5
  -      +1: jwoolley, bnicholes, rederpj
  -
       * mod_auth_digest: Allow sub-requests with different methods than the
         original request.  PR 25040.
           modules/aaa/mod_auth_digest.c: r1.82
  
  
  
  No                   revision
  No                   revision
  1.2.2.4   +1 -1      httpd-2.0/modules/experimental/cache_cache.c
  
  Index: cache_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/cache_cache.c,v
  retrieving revision 1.2.2.3
  retrieving revision 1.2.2.4
  diff -u -r1.2.2.3 -r1.2.2.4
  --- cache_cache.c	1 Jan 2004 13:30:39 -0000	1.2.2.3
  +++ cache_cache.c	5 Feb 2004 19:08:37 -0000	1.2.2.4
  @@ -161,7 +161,7 @@
           /* FIX: If ejected is NULL, we'll segfault here */
           priority = c->get_pri(ejected);
   
  -        if (c->queue_clock < priority)
  +        if (c->queue_clock > priority)
               c->queue_clock = priority;
   
           cache_hash_set(c->ht,
  
  
  
  1.88.2.6  +7 -5      httpd-2.0/modules/experimental/mod_mem_cache.c
  
  Index: mod_mem_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_mem_cache.c,v
  retrieving revision 1.88.2.5
  retrieving revision 1.88.2.6
  diff -u -r1.88.2.5 -r1.88.2.6
  --- mod_mem_cache.c	3 Feb 2004 15:30:58 -0000	1.88.2.5
  +++ mod_mem_cache.c	5 Feb 2004 19:08:37 -0000	1.88.2.6
  @@ -232,20 +232,21 @@
   #endif
   }
   /*
  - * functions return a 'negative' score as lower is better in a priority Q
  + * functions return a 'negative' score since priority queues
  + * dequeue the object with the highest value first
    */
   static long memcache_lru_algorithm(long queue_clock, void *a) 
   {
       cache_object_t *obj = (cache_object_t *)a;
       mem_cache_object_t *mobj = obj->vobj;
       if (mobj->priority == 0)
  -        mobj->priority = ((long)(queue_clock + mobj->total_refs));
  +        mobj->priority = queue_clock - mobj->total_refs;
   
       /*	
        * a 'proper' LRU function would just be
        *  mobj->priority = mobj->total_refs; 
        */
  -    return -1*mobj->priority;
  +    return mobj->priority;
   }
   
   static long memcache_gdsf_algorithm(long queue_clock, void *a) 
  @@ -254,9 +255,10 @@
       mem_cache_object_t *mobj = obj->vobj;
   
       if (mobj->priority == 0)
  -        mobj->priority = queue_clock + (long)(mobj->total_refs*1000 / mobj->m_len);
  +        mobj->priority = queue_clock -
  +                           (long)(mobj->total_refs*1000 / mobj->m_len);
   
  -    return -1*mobj->priority;
  +    return mobj->priority;
   }
   
   static void cleanup_cache_object(cache_object_t *obj)
  
  
  

Mime
View raw message