mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-22 21:06:21 +03:00
Add support for sharded bins within an arena.
This makes it possible to have multiple set of bins in an arena, which improves arena scalability because the bins (especially the small ones) are always the limiting factor in production workload. A bin shard is picked on allocation; each extent tracks the bin shard id for deallocation. The shard size will be determined using runtime options.
This commit is contained in:
parent
b23336af96
commit
37b8913925
12 changed files with 217 additions and 73 deletions
|
|
@ -2913,8 +2913,10 @@ stats_mutexes_reset_ctl(tsd_t *tsd, const size_t *mib,
|
|||
MUTEX_PROF_RESET(arena->base->mtx);
|
||||
|
||||
for (szind_t i = 0; i < SC_NBINS; i++) {
|
||||
bin_t *bin = &arena->bins[i];
|
||||
MUTEX_PROF_RESET(bin->lock);
|
||||
for (unsigned j = 0; j < bin_infos[i].n_shards; j++) {
|
||||
bin_t *bin = &arena->bins[i].bin_shards[j];
|
||||
MUTEX_PROF_RESET(bin->lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef MUTEX_PROF_RESET
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue