d27f29b468
Refactor arena and extent locking protocols such that arena and
extent locks are never held when calling into the extent_*_wrapper()
API. This requires extra care during purging since the arena lock no
longer protects the inner purging logic. It also requires extra care to
protect extents from being merged with adjacent extents.
Convert extent_t's 'active' flag to an enumerated 'state', so that
retained extents are explicitly marked as such, rather than depending on
ring linkage state.
Refactor the extent collections (and their synchronization) for cached
and retained extents into extents_t. Incorporate LRU functionality to
support purging. Incorporate page count accounting, which replaces
arena->ndirty and arena->stats.retained.
Assert that no core locks are held when entering any internal
[de]allocation functions. This is in addition to existing assertions
that no locks are held when entering external [de]allocation functions.
Audit and document synchronization protocols for all arena_t fields.
This fixes a potential deadlock due to recursive allocation during
gdump, in a similar fashion to
|
||
---|---|---|
.. | ||
arena.c | ||
atomic.c | ||
base.c | ||
bitmap.c | ||
ckh.c | ||
ctl.c | ||
extent_dss.c | ||
extent_mmap.c | ||
extent.c | ||
hash.c | ||
jemalloc_cpp.cpp | ||
jemalloc.c | ||
large.c | ||
mb.c | ||
mutex.c | ||
nstime.c | ||
pages.c | ||
prng.c | ||
prof.c | ||
rtree.c | ||
spin.c | ||
stats.c | ||
tcache.c | ||
ticker.c | ||
tsd.c | ||
util.c | ||
witness.c | ||
zone.c |