diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-09 12:45:38 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-09 12:45:38 +0100 |
| commit | 4c0830ffbc045290c167e482855cb25a639df0e0 (patch) | |
| tree | e66c2e0cbb209e5ab4442dfd7897cec23c8c5ff3 /allocators/tcmalloc_2.7_no_active_falsesharing.patch | |
| parent | cd9264be5594a7715dde29b3c0be82a00baf5fd1 (diff) | |
| download | allocbench-4c0830ffbc045290c167e482855cb25a639df0e0.tar.gz allocbench-4c0830ffbc045290c167e482855cb25a639df0e0.zip | |
add allocators build support and two allocator definitions
The allocators created by the file allocators/BA_allocators.py
are those used in my BA thesis available at: https://muhq.space/ba.html.
allocators/no_falsesharing.py builds patched versions of tcmalloc and
glibc without any allocator inroduced falsesharing.
Diffstat (limited to 'allocators/tcmalloc_2.7_no_active_falsesharing.patch')
| -rw-r--r-- | allocators/tcmalloc_2.7_no_active_falsesharing.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/allocators/tcmalloc_2.7_no_active_falsesharing.patch b/allocators/tcmalloc_2.7_no_active_falsesharing.patch new file mode 100644 index 0000000..c14172d --- /dev/null +++ b/allocators/tcmalloc_2.7_no_active_falsesharing.patch @@ -0,0 +1,17 @@ +diff --git a/src/thread_cache.cc b/src/thread_cache.cc +index 6d2f832..2074f4a 100644 +--- a/src/thread_cache.cc ++++ b/src/thread_cache.cc +@@ -120,7 +120,11 @@ void* ThreadCache::FetchFromCentralCache(uint32 cl, int32_t byte_size, + ASSERT(list->empty()); + const int batch_size = Static::sizemap()->num_objects_to_move(cl); + +- const int num_to_move = min<int>(list->max_length(), batch_size); ++ int num_to_move = min<int>(list->max_length(), batch_size); ++ const int cache_line_parts = 64 / byte_size; ++ if (cache_line_parts > 0 && cache_line_parts > num_to_move) ++ num_to_move = cache_line_parts; ++ + void *start, *end; + int fetch_count = Static::central_cache()[cl].RemoveRange( + &start, &end, num_to_move); |
