PA: Move edata_avail stat in, make it non-atomic.
This commit is contained in:
parent
f6bfa3dcca
commit
3c28aa6f17
@ -52,9 +52,6 @@ struct arena_stats_s {
|
|||||||
*/
|
*/
|
||||||
locked_zu_t retained; /* Derived. */
|
locked_zu_t retained; /* Derived. */
|
||||||
|
|
||||||
/* Number of edata_t structs allocated by base, but not being used. */
|
|
||||||
atomic_zu_t edata_avail; /* Derived. */
|
|
||||||
|
|
||||||
atomic_zu_t base; /* Derived. */
|
atomic_zu_t base; /* Derived. */
|
||||||
atomic_zu_t internal;
|
atomic_zu_t internal;
|
||||||
atomic_zu_t resident; /* Derived. */
|
atomic_zu_t resident; /* Derived. */
|
||||||
|
@ -69,6 +69,9 @@ struct pa_shard_stats_s {
|
|||||||
*/
|
*/
|
||||||
locked_zu_t mapped;
|
locked_zu_t mapped;
|
||||||
|
|
||||||
|
/* Number of edata_t structs allocated by base, but not being used. */
|
||||||
|
size_t edata_avail; /* Derived. */
|
||||||
|
|
||||||
/* VM space had to be leaked (undocumented). Normally 0. */
|
/* VM space had to be leaked (undocumented). Normally 0. */
|
||||||
atomic_zu_t abandoned_vm;
|
atomic_zu_t abandoned_vm;
|
||||||
};
|
};
|
||||||
|
@ -100,9 +100,8 @@ arena_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads,
|
|||||||
locked_inc_zu_unsynchronized(&astats->retained,
|
locked_inc_zu_unsynchronized(&astats->retained,
|
||||||
ecache_npages_get(&arena->pa_shard.ecache_retained) << LG_PAGE);
|
ecache_npages_get(&arena->pa_shard.ecache_retained) << LG_PAGE);
|
||||||
|
|
||||||
atomic_store_zu(&astats->edata_avail,
|
astats->pa_shard_stats.edata_avail = atomic_load_zu(
|
||||||
atomic_load_zu(&arena->pa_shard.edata_cache.count, ATOMIC_RELAXED),
|
&arena->pa_shard.edata_cache.count, ATOMIC_RELAXED);
|
||||||
ATOMIC_RELAXED);
|
|
||||||
|
|
||||||
/* Dirty decay stats */
|
/* Dirty decay stats */
|
||||||
locked_inc_u64_unsynchronized(
|
locked_inc_u64_unsynchronized(
|
||||||
|
@ -866,8 +866,8 @@ ctl_arena_stats_sdmerge(ctl_arena_t *ctl_sdarena, ctl_arena_t *ctl_arena,
|
|||||||
&astats->astats.pa_shard_stats.mapped);
|
&astats->astats.pa_shard_stats.mapped);
|
||||||
ctl_accum_locked_zu(&sdstats->astats.retained,
|
ctl_accum_locked_zu(&sdstats->astats.retained,
|
||||||
&astats->astats.retained);
|
&astats->astats.retained);
|
||||||
ctl_accum_atomic_zu(&sdstats->astats.edata_avail,
|
sdstats->astats.pa_shard_stats.edata_avail
|
||||||
&astats->astats.edata_avail);
|
+= astats->astats.pa_shard_stats.edata_avail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctl_accum_locked_u64(
|
ctl_accum_locked_u64(
|
||||||
@ -2919,9 +2919,7 @@ CTL_RO_CGEN(config_stats, stats_arenas_i_retained,
|
|||||||
locked_read_atomic_zu(&arenas_i(mib[2])->astats->astats.retained),
|
locked_read_atomic_zu(&arenas_i(mib[2])->astats->astats.retained),
|
||||||
size_t)
|
size_t)
|
||||||
CTL_RO_CGEN(config_stats, stats_arenas_i_extent_avail,
|
CTL_RO_CGEN(config_stats, stats_arenas_i_extent_avail,
|
||||||
atomic_load_zu(&arenas_i(mib[2])->astats->astats.edata_avail,
|
arenas_i(mib[2])->astats->astats.pa_shard_stats.edata_avail, size_t)
|
||||||
ATOMIC_RELAXED),
|
|
||||||
size_t)
|
|
||||||
|
|
||||||
CTL_RO_CGEN(config_stats, stats_arenas_i_dirty_npurge,
|
CTL_RO_CGEN(config_stats, stats_arenas_i_dirty_npurge,
|
||||||
locked_read_u64_unsynchronized(
|
locked_read_u64_unsynchronized(
|
||||||
|
Loading…
Reference in New Issue
Block a user