Arena stats: Move retained to PA, use plain ints.
Retained is a property of the allocated pages. The derived fields no longer require any locking; they're computed on demand.
This commit is contained in:
committed by
David Goldblatt
parent
e2cf3fb1a3
commit
d0c43217b5
@@ -45,17 +45,16 @@ struct arena_stats_large_s {
|
||||
typedef struct arena_stats_s arena_stats_t;
|
||||
struct arena_stats_s {
|
||||
LOCKEDINT_MTX_DECLARE(mtx)
|
||||
/*
|
||||
* Number of unused virtual memory bytes currently retained. Retained
|
||||
* bytes are technically mapped (though always decommitted or purged),
|
||||
* but they are excluded from the mapped statistic (above).
|
||||
*/
|
||||
locked_zu_t retained; /* Derived. */
|
||||
|
||||
atomic_zu_t base; /* Derived. */
|
||||
/*
|
||||
* resident includes the base stats -- that's why it lives here and not
|
||||
* in pa_shard_stats_t.
|
||||
*/
|
||||
size_t base; /* Derived. */
|
||||
size_t resident; /* Derived. */
|
||||
size_t metadata_thp; /* Derived. */
|
||||
|
||||
atomic_zu_t internal;
|
||||
atomic_zu_t resident; /* Derived. */
|
||||
atomic_zu_t metadata_thp;
|
||||
|
||||
atomic_zu_t allocated_large; /* Derived. */
|
||||
locked_u64_t nmalloc_large; /* Derived. */
|
||||
|
@@ -61,6 +61,14 @@ typedef struct pa_shard_stats_s pa_shard_stats_t;
|
||||
struct pa_shard_stats_s {
|
||||
pa_shard_decay_stats_t decay_dirty;
|
||||
pa_shard_decay_stats_t decay_muzzy;
|
||||
|
||||
/*
|
||||
* Number of unused virtual memory bytes currently retained. Retained
|
||||
* bytes are technically mapped (though always decommitted or purged),
|
||||
* but they are excluded from the mapped statistic (above).
|
||||
*/
|
||||
size_t retained; /* Derived. */
|
||||
|
||||
/*
|
||||
* Number of bytes currently mapped, excluding retained memory.
|
||||
*
|
||||
|
Reference in New Issue
Block a user