Move bg inactivity check out of purge inner loop.
I.e. do it once per call to arena_decay_stashed instead of once per muzzy purge.
This commit is contained in:
parent
71fc0dc968
commit
655a096343
@ -660,8 +660,6 @@ arena_decay_stashed(tsdn_t *tsdn, arena_t *arena, ehooks_t *ehooks,
|
|||||||
edata_size_get(edata))) {
|
edata_size_get(edata))) {
|
||||||
ecache_dalloc(tsdn, &arena->pa_shard, ehooks,
|
ecache_dalloc(tsdn, &arena->pa_shard, ehooks,
|
||||||
&arena->pa_shard.ecache_muzzy, edata);
|
&arena->pa_shard.ecache_muzzy, edata);
|
||||||
arena_background_thread_inactivity_check(tsdn,
|
|
||||||
arena, is_background_thread);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
JEMALLOC_FALLTHROUGH;
|
JEMALLOC_FALLTHROUGH;
|
||||||
@ -727,6 +725,8 @@ arena_decay_to_limit(tsdn_t *tsdn, arena_t *arena, decay_t *decay,
|
|||||||
decay_stats, ecache, all, &decay_extents);
|
decay_stats, ecache, all, &decay_extents);
|
||||||
assert(npurged == npurge);
|
assert(npurged == npurge);
|
||||||
}
|
}
|
||||||
|
arena_background_thread_inactivity_check(tsdn, arena,
|
||||||
|
is_background_thread);
|
||||||
|
|
||||||
malloc_mutex_lock(tsdn, &decay->mtx);
|
malloc_mutex_lock(tsdn, &decay->mtx);
|
||||||
decay->purging = false;
|
decay->purging = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user