Inherits RamCache.

| Public Member Functions | |
| int | get (INK_MD5 *key, Ptr< IOBufferData > *ret_data, uint32_t auxkey1=0, uint32_t auxkey2=0) | 
| int | put (INK_MD5 *key, IOBufferData *data, uint32_t len, bool copy=false, uint32_t auxkey1=0, uint32_t auxkey2=0) | 
| int | fixup (INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2) | 
| void | init (int64_t max_bytes, Vol *vol) | 
| DList (RamCacheCLFUSEntry, hash_link)*bucket | |
| Que (RamCacheCLFUSEntry, lru_link) lru[2] | |
| void | compress_entries (EThread *thread, int do_at_most=INT_MAX) | 
| void | resize_hashtable () | 
| void | victimize (RamCacheCLFUSEntry *e) | 
| void | move_compressed (RamCacheCLFUSEntry *e) | 
| RamCacheCLFUSEntry * | destroy (RamCacheCLFUSEntry *e) | 
| void | requeue_victims (RamCacheCLFUS *c, Que(RamCacheCLFUSEntry, lru_link)&victims) | 
| void | tick () | 
| RamCacheCLFUS () | |
| Data Fields | |
| int64_t | max_bytes | 
| int64_t | bytes | 
| int64_t | objects | 
| Vol * | vol | 
| int64_t | history | 
| int | ibuckets | 
| int | nbuckets | 
| uint16_t * | seen | 
| int | ncompressed | 
| RamCacheCLFUSEntry * | compressed | 
Definition at line 69 of file RamCacheCLFUS.cc.
| RamCacheCLFUS::RamCacheCLFUS | ( | ) |  [inline] | 
Definition at line 98 of file RamCacheCLFUS.cc.
| void RamCacheCLFUS::compress_entries | ( | EThread * | thread, | |
| int | do_at_most = INT_MAX | |||
| ) | 
Definition at line 356 of file RamCacheCLFUS.cc.
References ats_free(), ats_malloc(), RamCacheCLFUSEntry::auxkey1, RamCacheCLFUSEntry::auxkey2, bytes, CACHE_COMPRESSION_FASTLZ, CACHE_COMPRESSION_LIBLZMA, CACHE_COMPRESSION_LIBZ, cache_config_ram_cache_compress, cache_config_ram_cache_compress_percent, cache_ram_cache_bytes_stat, CACHE_SUM_DYN_STAT_THREAD, check_accounting, compressed, RamCacheCLFUSEntry::compressed_len, RamCacheCLFUSEntry::data, DDebug, fastlz_compress(), RamCacheCLFUSEntry::flag_bits, ink_assert, RamCacheCLFUSEntry::key, RamCacheCLFUSEntry::len, memcpy, Continuation::mutex, MUTEX_TAKE_LOCK, MUTEX_UNTAKE_LOCK, nbuckets, ncompressed, new_xmalloc_IOBufferData, objects, REQUIRED_COMPRESSION, REQUIRED_SHRINK, RamCacheCLFUSEntry::size, ats::CryptoHash::slice32(), and vol.
Referenced by RamCacheCLFUSCompressor::mainEvent().
| RamCacheCLFUSEntry * RamCacheCLFUS::destroy | ( | RamCacheCLFUSEntry * | e | ) | 
Definition at line 336 of file RamCacheCLFUS.cc.
References RamCacheCLFUSEntry::auxkey1, RamCacheCLFUSEntry::auxkey2, bytes, cache_ram_cache_bytes_stat, CACHE_SUM_DYN_STAT_THREAD, RamCacheCLFUSEntry::data, DDebug, RamCacheCLFUSEntry::flag_bits, history, RamCacheCLFUSEntry::key, move_compressed(), nbuckets, objects, ramCacheCLFUSEntryAllocator, RamCacheCLFUSEntry::size, ats::CryptoHash::slice32(), this_thread(), and THREAD_FREE.
| RamCacheCLFUS::DList | ( | RamCacheCLFUSEntry | , | |
| hash_link | ||||
| ) | 
Referenced by resize_hashtable().
| int RamCacheCLFUS::fixup | ( | INK_MD5 * | key, | |
| uint32_t | old_auxkey1, | |||
| uint32_t | old_auxkey2, | |||
| uint32_t | new_auxkey1, | |||
| uint32_t | new_auxkey2 | |||
| ) |  [virtual] | 
Implements RamCache.
Definition at line 658 of file RamCacheCLFUS.cc.
References RamCacheCLFUSEntry::auxkey1, RamCacheCLFUSEntry::auxkey2, RamCacheCLFUSEntry::key, max_bytes, nbuckets, and ats::CryptoHash::slice32().
| int RamCacheCLFUS::get | ( | INK_MD5 * | key, | |
| Ptr< IOBufferData > * | ret_data, | |||
| uint32_t | auxkey1 = 0, | |||
| uint32_t | auxkey2 = 0 | |||
| ) |  [virtual] | 
Implements RamCache.
Definition at line 203 of file RamCacheCLFUS.cc.
References IOBufferData::_mem_type, assert, ats_free(), ats_malloc(), RamCacheCLFUSEntry::auxkey1, RamCacheCLFUSEntry::auxkey2, bytes, CACHE_COMPRESSION_FASTLZ, CACHE_COMPRESSION_LIBLZMA, CACHE_COMPRESSION_LIBZ, cache_ram_cache_bytes_stat, cache_ram_cache_hits_stat, cache_ram_cache_misses_stat, CACHE_SUM_DYN_STAT_THREAD, check_accounting, RamCacheCLFUSEntry::compressed_len, IOBufferData::data(), RamCacheCLFUSEntry::data, DDebug, destroy(), fastlz_decompress(), RamCacheCLFUSEntry::flag_bits, RamCacheCLFUSEntry::hits, iobuffer_size_to_index(), RamCacheCLFUSEntry::key, RamCacheCLFUSEntry::len, LZMA_BASE_MEMLIMIT, MAX_BUFFER_SIZE_INDEX, max_bytes, MEMALIGNED, memcpy, move_compressed(), nbuckets, new_IOBufferData, new_xmalloc_IOBufferData, RamCacheCLFUSEntry::size, and ats::CryptoHash::slice32().
| void RamCacheCLFUS::init | ( | int64_t | max_bytes, | |
| Vol * | vol | |||
| ) |  [virtual] | 
Implements RamCache.
Definition at line 174 of file RamCacheCLFUS.cc.
References DDebug, ET_TASK, eventProcessor, HRTIME_SECOND, ink_assert, max_bytes, resize_hashtable(), EventProcessor::schedule_every(), and vol.
| void RamCacheCLFUS::move_compressed | ( | RamCacheCLFUSEntry * | e | ) | 
Definition at line 323 of file RamCacheCLFUS.cc.
References compressed, and ncompressed.
| int RamCacheCLFUS::put | ( | INK_MD5 * | key, | |
| IOBufferData * | data, | |||
| uint32_t | len, | |||
| bool | copy = false, | |||
| uint32_t | auxkey1 = 0, | |||
| uint32_t | auxkey2 = 0 | |||
| ) |  [virtual] | 
Implements RamCache.
Definition at line 500 of file RamCacheCLFUS.cc.
References ats_malloc(), RamCacheCLFUSEntry::auxkey1, RamCacheCLFUSEntry::auxkey2, IOBufferData::block_size(), bucket_sizes, bytes, cache_config_ram_cache_use_seen_filter, cache_ram_cache_bytes_stat, CACHE_SUM_DYN_STAT_THREAD, CACHE_VALUE, check_accounting, compressed, IOBufferData::data(), RamCacheCLFUSEntry::data, DDebug, destroy(), RamCacheCLFUSEntry::flag_bits, RamCacheCLFUSEntry::flags, history, RamCacheCLFUSEntry::hits, ibuckets, RamCacheCLFUSEntry::key, RamCacheCLFUSEntry::len, max_bytes, memcpy, move_compressed(), nbuckets, ncompressed, new_xmalloc_IOBufferData, objects, Que(), ramCacheCLFUSEntryAllocator, REQUEUE_HITS, requeue_victims(), resize_hashtable(), seen, RamCacheCLFUSEntry::size, ats::CryptoHash::slice32(), this_ethread(), THREAD_ALLOC, tick(), and victimize().
| RamCacheCLFUS::Que | ( | RamCacheCLFUSEntry | , | |
| lru_link | ||||
| ) | 
Referenced by put().
| void RamCacheCLFUS::requeue_victims | ( | RamCacheCLFUS * | c, | |
| Que(RamCacheCLFUSEntry, lru_link)& | victims | |||
| ) | 
Definition at line 488 of file RamCacheCLFUS.cc.
References bytes, cache_ram_cache_bytes_stat, CACHE_SUM_DYN_STAT_THREAD, RamCacheCLFUSEntry::hits, REQUEUE_HITS, and RamCacheCLFUSEntry::size.
Referenced by put().
| void RamCacheCLFUS::resize_hashtable | ( | ) | 
Definition at line 148 of file RamCacheCLFUS.cc.
References ats_free(), ats_malloc(), bucket_sizes, cache_config_ram_cache_use_seen_filter, DDebug, DList(), ibuckets, RamCacheCLFUSEntry::key, nbuckets, seen, and ats::CryptoHash::slice32().
| void RamCacheCLFUS::tick | ( | ) | 
Definition at line 289 of file RamCacheCLFUS.cc.
References RamCacheCLFUSEntry::auxkey1, RamCacheCLFUSEntry::auxkey2, DDebug, RamCacheCLFUSEntry::flag_bits, history, HISTORY_HYSTERIA, RamCacheCLFUSEntry::hits, RamCacheCLFUSEntry::key, nbuckets, objects, ramCacheCLFUSEntryAllocator, REQUEUE_HITS, RamCacheCLFUSEntry::size, ats::CryptoHash::slice32(), this_thread(), and THREAD_FREE.
Referenced by put().
| void RamCacheCLFUS::victimize | ( | RamCacheCLFUSEntry * | e | ) | 
Definition at line 312 of file RamCacheCLFUS.cc.
References RamCacheCLFUSEntry::auxkey1, RamCacheCLFUSEntry::auxkey2, RamCacheCLFUSEntry::data, DDebug, RamCacheCLFUSEntry::flag_bits, history, RamCacheCLFUSEntry::key, objects, RamCacheCLFUSEntry::size, and ats::CryptoHash::slice32().
Referenced by put().
| int64_t RamCacheCLFUS::bytes | 
Definition at line 71 of file RamCacheCLFUS.cc.
Referenced by compress_entries(), destroy(), get(), put(), and requeue_victims().
Definition at line 90 of file RamCacheCLFUS.cc.
Referenced by compress_entries(), move_compressed(), and put().
| int64_t RamCacheCLFUS::history | 
Definition at line 83 of file RamCacheCLFUS.cc.
Referenced by destroy(), put(), tick(), and victimize().
Definition at line 84 of file RamCacheCLFUS.cc.
Referenced by put(), and resize_hashtable().
| int64_t RamCacheCLFUS::max_bytes | 
Definition at line 85 of file RamCacheCLFUS.cc.
Referenced by compress_entries(), destroy(), fixup(), get(), put(), resize_hashtable(), and tick().
Definition at line 89 of file RamCacheCLFUS.cc.
Referenced by compress_entries(), move_compressed(), and put().
| int64_t RamCacheCLFUS::objects | 
Definition at line 72 of file RamCacheCLFUS.cc.
Referenced by compress_entries(), destroy(), put(), tick(), and victimize().
| uint16_t* RamCacheCLFUS::seen | 
Definition at line 88 of file RamCacheCLFUS.cc.
Referenced by put(), and resize_hashtable().
Definition at line 82 of file RamCacheCLFUS.cc.
Referenced by compress_entries(), and init().
 1.7.1
 1.7.1