mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-24 16:13:38 +03:00
PA: Make mapped stat atomic.
We always have atomic_zu_t, and mapped/unmapped transitions are always expensive enough that trying to piggyback on a lock is a waste of time.
This commit is contained in:
parent
3c28aa6f17
commit
436789ad96
6 changed files with 22 additions and 30 deletions
|
|
@ -966,10 +966,9 @@ extent_maximally_purge(tsdn_t *tsdn, pa_shard_t *shard, ehooks_t *ehooks,
|
|||
LOCKEDINT_MTX(*shard->stats_mtx),
|
||||
&shard->stats->decay_dirty.purged,
|
||||
extent_size >> LG_PAGE);
|
||||
locked_dec_zu(tsdn,
|
||||
LOCKEDINT_MTX(*shard->stats_mtx),
|
||||
&shard->stats->mapped, extent_size);
|
||||
LOCKEDINT_MTX_UNLOCK(tsdn, *shard->stats_mtx);
|
||||
atomic_fetch_sub_zu(&shard->stats->mapped, extent_size,
|
||||
ATOMIC_RELAXED);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue