diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-03-15 17:42:57 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-03-15 17:42:57 +1100 |
commit | 5a16cf8bc9aaa50a67a564138f359ac9356d7f57 (patch) | |
tree | 4a913acfca287dc54fca7e32e8ed4f60235d8d96 /src/include/cache.i | |
parent | 309aef4f1dff5902afba3a7fe821347e03fff15c (diff) | |
download | mongo-5a16cf8bc9aaa50a67a564138f359ac9356d7f57.tar.gz |
Only signal the eviction server condvar if we have reason to believe it isn't running.
Diffstat (limited to 'src/include/cache.i')
-rw-r--r-- | src/include/cache.i | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/cache.i b/src/include/cache.i index 866f00693c2..5ac61f6cb69 100644 --- a/src/include/cache.i +++ b/src/include/cache.i @@ -10,7 +10,7 @@ * Wake the eviction server if necessary. */ static inline void -__wt_eviction_check(WT_SESSION_IMPL *session, int *read_lockoutp) +__wt_eviction_check(WT_SESSION_IMPL *session, int *read_lockoutp, int wake) { WT_CACHE *cache; WT_CONNECTION_IMPL *conn; @@ -31,7 +31,7 @@ __wt_eviction_check(WT_SESSION_IMPL *session, int *read_lockoutp) *read_lockoutp = (bytes_inuse > bytes_max); /* Wake eviction when we're over the trigger cache size. */ - if (bytes_inuse > cache->eviction_trigger * (bytes_max / 100)) + if (wake && bytes_inuse > cache->eviction_trigger * (bytes_max / 100)) __wt_evict_server_wake(session); } @@ -60,7 +60,7 @@ __wt_eviction_page_check(WT_SESSION_IMPL *session, WT_PAGE *page) */ WT_RET(__wt_evict_page_request(session, page)); } else - __wt_eviction_check(session, NULL); + __wt_eviction_check(session, NULL, 1); return (0); } |