[BACK]Return to uvm_pdpolicy_clockpro.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / uvm

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/uvm/uvm_pdpolicy_clockpro.c between version 1.1.2.9 and 1.1.2.10

version 1.1.2.9, 2006/03/24 13:48:10 version 1.1.2.10, 2006/03/24 14:02:24
Line 347  struct bucket {
Line 347  struct bucket {
 static int cycle_target;  static int cycle_target;
 static int cycle_target_frac;  static int cycle_target_frac;
   
 static struct bucket *buckets;  static struct bucket static_bucket;
 static size_t hashsize;  static struct bucket *buckets = &static_bucket;
   static size_t hashsize = 1;
   
 static int coldadj;  static int coldadj;
 #define COLDTARGET_ADJ(d)       coldadj += (d)  #define COLDTARGET_ADJ(d)       coldadj += (d)
Line 421  clockpro_hashinit(uint64_t n)
Line 422  clockpro_hashinit(uint64_t n)
         buckets = newbuckets;          buckets = newbuckets;
         hashsize = sz;          hashsize = sz;
         /* XXX unlock */          /* XXX unlock */
         if (oldbuckets) {          if (oldbuckets != &static_bucket) {
                 clockpro_hashfree(oldbuckets, oldsz);                  clockpro_hashfree(oldbuckets, oldsz);
         }          }
 }  }
Line 430  static struct bucket *
Line 431  static struct bucket *
 nonresident_getbucket(objid_t obj, off_t idx)  nonresident_getbucket(objid_t obj, off_t idx)
 {  {
         uint32_t hash;          uint32_t hash;
         static struct bucket static_bucket;  
   
         if (hashsize == 0) {  
                 return &static_bucket;  
         }  
   
         hash = pageidentityhash1(obj, idx);          hash = pageidentityhash1(obj, idx);
         return &buckets[hash % hashsize];          return &buckets[hash % hashsize];

Legend:
Removed from v.1.1.2.9  
changed lines
  Added in v.1.1.2.10

CVSweb <webmaster@jp.NetBSD.org>