diff options
author | Ben Maurer <bmaurer@fb.com> | 2014-04-05 22:59:08 (GMT) |
---|---|---|
committer | Ben Maurer <bmaurer@fb.com> | 2014-04-05 22:59:08 (GMT) |
commit | be8e59f5a64ef775c9694aee0d6a87d92336d303 (patch) | |
tree | daf932cc9677842166eed330559acbef1000d27e /src/mutex.c | |
parent | 46c0af68bd248b04df75e4f92d5fb804c3d75340 (diff) | |
download | jemalloc-be8e59f5a64ef775c9694aee0d6a87d92336d303.zip jemalloc-be8e59f5a64ef775c9694aee0d6a87d92336d303.tar.gz jemalloc-be8e59f5a64ef775c9694aee0d6a87d92336d303.tar.bz2 |
Don't dereference chunk->arena in free() hot path
When you call free() we load chunk->arena even though that
data isn't used on the tcache hot path.
In profiling some FB applications, I found that ~30% of the
dTLB misses in the free() function come from this line. With
4 MB chunks, the arena_chunk_t->map is ~ 32 KB (1024 pages
in the chunk, 4 8 byte pointers in arena_chunk_map_t). This
means there's only a 1/8 chance of the page containing
chunk->arena also comtaining the map bits.
Diffstat (limited to 'src/mutex.c')
0 files changed, 0 insertions, 0 deletions