diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2016-03-04 15:43:07 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2016-03-04 15:43:07 +1100 |
commit | 73d925b40cbd2143d9a705de81a6cc4a262aae22 (patch) | |
tree | 4ff221fa76539683e73edb7a878ee2432efed310 /src/conn/conn_cache.c | |
parent | f91fbe07e483c8fae5159c6036d4caa181777b2a (diff) | |
download | mongo-73d925b40cbd2143d9a705de81a6cc4a262aae22.tar.gz |
WT-2318 Add implementation for auto adjusting condition variables.
Where the amount of time spent waiting varies depending on how
whether work is being done between timeouts.
Diffstat (limited to 'src/conn/conn_cache.c')
-rw-r--r-- | src/conn/conn_cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conn/conn_cache.c b/src/conn/conn_cache.c index 1831aad5895..0f370856881 100644 --- a/src/conn/conn_cache.c +++ b/src/conn/conn_cache.c @@ -147,8 +147,8 @@ __wt_cache_create(WT_SESSION_IMPL *session, const char *cfg[]) WT_ERR_MSG(session, EINVAL, "eviction target must be lower than the eviction trigger"); - WT_ERR(__wt_cond_alloc(session, - "cache eviction server", false, &cache->evict_cond)); + WT_ERR(__wt_cond_auto_alloc(session, "cache eviction server", + false, 10000, WT_MILLION, &cache->evict_cond)); WT_ERR(__wt_cond_alloc(session, "eviction waiters", false, &cache->evict_waiter_cond)); WT_ERR(__wt_spin_init(session, &cache->evict_lock, "cache eviction")); @@ -246,7 +246,7 @@ __wt_cache_destroy(WT_SESSION_IMPL *session) " bytes dirty and %" PRIu64 " pages dirty", cache->bytes_dirty, cache->pages_dirty); - WT_TRET(__wt_cond_destroy(session, &cache->evict_cond)); + WT_TRET(__wt_cond_auto_destroy(session, &cache->evict_cond)); WT_TRET(__wt_cond_destroy(session, &cache->evict_waiter_cond)); __wt_spin_destroy(session, &cache->evict_lock); __wt_spin_destroy(session, &cache->evict_walk_lock); |