Changeset 250 for trunk/include


Ignore:
Timestamp:
05/05/11 00:00:24 (13 years ago)
Author:
tim
Message:

added key caching
readded SK caching
fixed races and deadlocks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/regfi.h

    r249 r250  
    141141/******************************************************************************/
    142142
    143 /* Flags determining whether or not to cache various record types internally */
    144 #define REGFI_CACHE_SK             0
     143/* Flags determining how many records to cache internally */
     144#define REGFI_CACHE_SK_MAX         64
     145#define REGFI_CACHE_NK_MAX         1024
    145146
    146147/* This maximum depth is described here:
     
    815816  pthread_rwlock_t hbins_lock;
    816817
    817   /* SK record cached since they're repeatedly reused */
     818  /* Small number of SK records cached */
    818819  lru_cache* sk_cache;
    819820
    820821  /* Need exclusive access for LRUs, since lookups make changes */
    821822  pthread_mutex_t sk_lock;
     823
     824  /* Limited number of keys cached */
     825  lru_cache* nk_cache;
     826
     827  /* Need exclusive access for LRUs, since lookups make changes */
     828  pthread_mutex_t nk_lock;
    822829
    823830  /* Needed to protect various talloc calls */
Note: See TracChangeset for help on using the changeset viewer.