Synchronize arena->decay with arena->decay.mtx.
This removes the last use of arena->lock.
This commit is contained in:
@@ -81,7 +81,7 @@ arena_decay_ticks(tsdn_t *tsdn, arena_t *arena, unsigned nticks) {
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE void
|
||||
arena_decay_tick(tsdn_t *tsdn, arena_t *arena) {
|
||||
malloc_mutex_assert_not_owner(tsdn, &arena->lock);
|
||||
malloc_mutex_assert_not_owner(tsdn, &arena->decay.mtx);
|
||||
|
||||
arena_decay_ticks(tsdn, arena, 1);
|
||||
}
|
||||
|
@@ -37,6 +37,8 @@ struct arena_bin_info_s {
|
||||
};
|
||||
|
||||
struct arena_decay_s {
|
||||
/* Synchronizes all fields. */
|
||||
malloc_mutex_t mtx;
|
||||
/*
|
||||
* Approximate time in seconds from the creation of a set of unused
|
||||
* dirty pages until an equivalent set of unused dirty pages is purged
|
||||
@@ -121,12 +123,6 @@ struct arena_s {
|
||||
*/
|
||||
unsigned nthreads[2];
|
||||
|
||||
/*
|
||||
* Synchronizes various arena operations, as indicated in field-specific
|
||||
* comments.
|
||||
*/
|
||||
malloc_mutex_t lock;
|
||||
|
||||
/* Synchronization: internal. */
|
||||
arena_stats_t stats;
|
||||
|
||||
|
@@ -34,7 +34,7 @@ typedef int witness_comp_t (const witness_t *, void *, const witness_t *,
|
||||
*/
|
||||
#define WITNESS_RANK_CORE 9U
|
||||
|
||||
#define WITNESS_RANK_ARENA 9U
|
||||
#define WITNESS_RANK_DECAY 9U
|
||||
#define WITNESS_RANK_TCACHE_QL 10U
|
||||
#define WITNESS_RANK_EXTENTS 11U
|
||||
#define WITNESS_RANK_EXTENT_FREELIST 12U
|
||||
|
Reference in New Issue
Block a user