diff options
author | Qi Wang <interwq@gwu.edu> | 2017-04-27 21:12:51 (GMT) |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2017-04-28 17:59:04 (GMT) |
commit | d901a377753cf4c75d2f72f7a692c44f61eac4a4 (patch) | |
tree | 4ce80a5419f259a81a72049353a36efc19fa1025 | |
parent | 5c56603e91d8d0021280615f86b95efe0463b6a8 (diff) | |
download | jemalloc-d901a377753cf4c75d2f72f7a692c44f61eac4a4.zip jemalloc-d901a377753cf4c75d2f72f7a692c44f61eac4a4.tar.gz jemalloc-d901a377753cf4c75d2f72f7a692c44f61eac4a4.tar.bz2 |
Revert "Use try_flush first in tcache_dalloc."
This reverts commit b0c2a28280d363fc85aa8b4fdbe7814ef46cb17b. Production
benchmark shows this caused significant regression in both CPU and memory
consumption. Will investigate separately later on.
-rw-r--r-- | include/jemalloc/internal/tcache_inlines.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/include/jemalloc/internal/tcache_inlines.h b/include/jemalloc/internal/tcache_inlines.h index 511fcea..5e9a7a0 100644 --- a/include/jemalloc/internal/tcache_inlines.h +++ b/include/jemalloc/internal/tcache_inlines.h @@ -201,11 +201,8 @@ tcache_dalloc_small(tsd_t *tsd, tcache_t *tcache, void *ptr, szind_t binind, tbin = tcache_small_bin_get(tcache, binind); tbin_info = &tcache_bin_info[binind]; if (unlikely(tbin->ncached == tbin_info->ncached_max)) { - if (tcache_bin_try_flush_small(tsd, tcache, tbin, binind, - (tbin_info->ncached_max >> 1)) == 0) { - tcache_bin_flush_small(tsd, tcache, tbin, binind, - (tbin_info->ncached_max >> 1)); - } + tcache_bin_flush_small(tsd, tcache, tbin, binind, + (tbin_info->ncached_max >> 1)); } assert(tbin->ncached < tbin_info->ncached_max); tbin->ncached++; @@ -230,11 +227,8 @@ tcache_dalloc_large(tsd_t *tsd, tcache_t *tcache, void *ptr, szind_t binind, tbin = tcache_large_bin_get(tcache, binind); tbin_info = &tcache_bin_info[binind]; if (unlikely(tbin->ncached == tbin_info->ncached_max)) { - if (tcache_bin_try_flush_large(tsd, tcache, tbin, binind, - (tbin_info->ncached_max >> 1)) == 0) { - tcache_bin_flush_large(tsd, tcache, tbin, binind, - (tbin_info->ncached_max >> 1)); - } + tcache_bin_flush_large(tsd, tcache, tbin, binind, + (tbin_info->ncached_max >> 1)); } assert(tbin->ncached < tbin_info->ncached_max); tbin->ncached++; |