Updated Branches: refs/heads/master 3eb3995df -> 7afc91bf5
TS-2300: remove the HIT_EVACUATE build option HIT_EVACUATE is always on, so there's no need for a build option. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/7afc91bf Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/7afc91bf Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/7afc91bf Branch: refs/heads/master Commit: 7afc91bf5bcdb8e3d605a0111badf09a3534316c Parents: 3eb3995 Author: James Peach <[email protected]> Authored: Thu Oct 24 10:25:56 2013 -0700 Committer: James Peach <[email protected]> Committed: Fri Oct 25 19:05:53 2013 -0700 ---------------------------------------------------------------------- CHANGES | 3 +++ iocore/cache/Cache.cc | 8 +------- iocore/cache/CacheDir.cc | 4 ---- iocore/cache/CacheRead.cc | 6 ------ iocore/cache/P_CacheInternal.h | 5 ----- mgmt/RecordsConfig.cc | 2 +- 6 files changed, 5 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7afc91bf/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 729d765..7255533 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.1.0 + + *) [TS-2300] Remove the HIT_EVACUATE build option. + *) [TS-2227] Allow for multiple config files for a header_rewrite plugin invocation (be it in remap.config or plugin.config). http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7afc91bf/iocore/cache/Cache.cc ---------------------------------------------------------------------- diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc index e417ab8..8eba0cd 100644 --- a/iocore/cache/Cache.cc +++ b/iocore/cache/Cache.cc @@ -69,10 +69,8 @@ int cache_config_max_doc_size = 0; int cache_config_min_average_object_size = ESTIMATED_OBJECT_SIZE; int64_t cache_config_ram_cache_cutoff = AGG_SIZE; int cache_config_max_disk_errors = 5; -#ifdef HIT_EVACUATE int cache_config_hit_evacuate_percent = 10; int cache_config_hit_evacuate_size_limit = 0; -#endif int cache_config_force_sector_size = 0; int cache_config_target_fragment_size = DEFAULT_TARGET_FRAGMENT_SIZE; int cache_config_agg_write_backlog = AGG_SIZE * 2; @@ -1259,9 +1257,7 @@ Vol::init(char *s, off_t blocks, off_t dir_skip, bool clear) start = dir_skip; vol_init_data(this); data_blocks = (len - (start - skip)) / STORE_BLOCK_SIZE; -#ifdef HIT_EVACUATE hit_evacuate_window = (data_blocks * cache_config_hit_evacuate_percent) / 100; -#endif evacuate_size = (int) (len / EVACUATION_BUCKET_SIZE) + 2; int evac_len = (int) evacuate_size * sizeof(DLL<EvacuationBlock>); @@ -3382,14 +3378,12 @@ ink_cache_init(ModuleVersion v) _exit(1); } } - // TODO: These are left here, since they are only registered if HIT_EVACUATE is enabled. -#ifdef HIT_EVACUATE + REC_EstablishStaticConfigInt32(cache_config_hit_evacuate_percent, "proxy.config.cache.hit_evacuate_percent"); Debug("cache_init", "proxy.config.cache.hit_evacuate_percent = %d", cache_config_hit_evacuate_percent); REC_EstablishStaticConfigInt32(cache_config_hit_evacuate_size_limit, "proxy.config.cache.hit_evacuate_size_limit"); Debug("cache_init", "proxy.config.cache.hit_evacuate_size_limit = %d", cache_config_hit_evacuate_size_limit); -#endif REC_EstablishStaticConfigInt32(cache_config_force_sector_size, "proxy.config.cache.force_sector_size"); REC_EstablishStaticConfigInt32(cache_config_target_fragment_size, "proxy.config.cache.target_fragment_size"); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7afc91bf/iocore/cache/CacheDir.cc ---------------------------------------------------------------------- diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc index 2ac5305..e00930e 100644 --- a/iocore/cache/CacheDir.cc +++ b/iocore/cache/CacheDir.cc @@ -1023,10 +1023,8 @@ sync_cache_dir_on_shutdown(void) Debug("cache_dir_sync", "Dir %s: ignoring -- not dirty", d->hash_id); continue; } -#ifdef HIT_EVACUATE // recompute hit_evacuate_window d->hit_evacuate_window = (d->data_blocks * cache_config_hit_evacuate_percent) / 100; -#endif // check if we have data in the agg buffer @@ -1147,10 +1145,8 @@ Lrestart: } Vol *d = gvol[vol]; -#ifdef HIT_EVACUATE // recompute hit_evacuate_window d->hit_evacuate_window = (d->data_blocks * cache_config_hit_evacuate_percent) / 100; -#endif if (DISK_BAD(d->disk)) goto Ldone; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7afc91bf/iocore/cache/CacheRead.cc ---------------------------------------------------------------------- diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc index 3c97305..48de9c1 100644 --- a/iocore/cache/CacheRead.cc +++ b/iocore/cache/CacheRead.cc @@ -510,7 +510,6 @@ CacheVC::openReadClose(int event, Event * /* e ATS_UNUSED */) CACHE_TRY_LOCK(lock, vol->mutex, mutex->thread_holding); if (!lock) VC_SCHED_LOCK_RETRY(); -#ifdef HIT_EVACUATE if (f.hit_evacuate && dir_valid(vol, &first_dir) && closed > 0) { if (f.single_fragment) vol->force_evacuate_head(&first_dir, dir_pinned(&first_dir)); @@ -519,7 +518,6 @@ CacheVC::openReadClose(int event, Event * /* e ATS_UNUSED */) vol->force_evacuate_head(&earliest_dir, dir_pinned(&earliest_dir)); } } -#endif vol->close_read(this); return free_CacheVC(this); } @@ -836,7 +834,6 @@ CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUS doc_pos = doc->prefix_len(); next_CacheKey(&key, &doc->key); vol->begin_read(this); -#ifdef HIT_EVACUATE if (vol->within_hit_evacuate_window(&earliest_dir) && (!cache_config_hit_evacuate_size_limit || doc_len <= (uint64_t)cache_config_hit_evacuate_size_limit) #if TS_USE_INTERIM_CACHE == 1 @@ -847,7 +844,6 @@ CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUS dir_offset(&earliest_dir), offset_to_vol_offset(vol, vol->header->write_pos), vol->header->phase); f.hit_evacuate = 1; } -#endif goto Lsuccess; Lread: if (dir_probe(&key, vol, &earliest_dir, &last_collision) || @@ -1134,7 +1130,6 @@ CacheVC::openReadStartHead(int event, Event * e) if (!f.single_fragment) goto Learliest; -#ifdef HIT_EVACUATE if (vol->within_hit_evacuate_window(&dir) && (!cache_config_hit_evacuate_size_limit || doc_len <= (uint64_t)cache_config_hit_evacuate_size_limit) #if TS_USE_INTERIM_CACHE == 1 @@ -1145,7 +1140,6 @@ CacheVC::openReadStartHead(int event, Event * e) dir_offset(&dir), offset_to_vol_offset(vol, vol->header->write_pos), vol->header->phase); f.hit_evacuate = 1; } -#endif first_buf = buf; vol->begin_read(this); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7afc91bf/iocore/cache/P_CacheInternal.h ---------------------------------------------------------------------- diff --git a/iocore/cache/P_CacheInternal.h b/iocore/cache/P_CacheInternal.h index 4f33fdc..02bf78d 100644 --- a/iocore/cache/P_CacheInternal.h +++ b/iocore/cache/P_CacheInternal.h @@ -36,7 +36,6 @@ struct EvacuationBlock; // Compilation Options -#define HIT_EVACUATE 1 #define ALTERNATES 1 // #define CACHE_LOCK_FAIL_RATE 0.001 // #define CACHE_AGG_FAIL_RATE 0.005 @@ -228,10 +227,8 @@ extern int cache_config_agg_write_backlog; extern int cache_config_ram_cache_compress; extern int cache_config_ram_cache_compress_percent; extern int cache_config_ram_cache_use_seen_filter; -#ifdef HIT_EVACUATE extern int cache_config_hit_evacuate_percent; extern int cache_config_hit_evacuate_size_limit; -#endif extern int cache_config_force_sector_size; extern int cache_config_target_fragment_size; extern int cache_config_mutex_retry_delay; @@ -493,9 +490,7 @@ struct CacheVC: public CacheVConnection unsigned int rewrite_resident_alt:1; unsigned int readers:1; unsigned int doc_from_ram_cache:1; -#ifdef HIT_EVACUATE unsigned int hit_evacuate:1; -#endif #if TS_USE_INTERIM_CACHE == 1 unsigned int read_from_interim:1; unsigned int write_into_interim:1; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7afc91bf/mgmt/RecordsConfig.cc ---------------------------------------------------------------------- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index 647174f..b5e87bc 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -862,7 +862,7 @@ RecordElement RecordsConfig[] = { , //############################################################################## //# - //# HIT_EVACUATE + //# Hit Evacuation //# //############################################################################## {RECT_CONFIG, "proxy.config.cache.hit_evacuate_percent", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
