summaryrefslogtreecommitdiffstats
path: root/dragonflybsd
diff options
context:
space:
mode:
authorIvan Shapovalov <intelfx@intelfx.name>2022-12-27 04:57:52 +0400
committerBenBE <BenBE@geshi.org>2023-04-23 16:00:17 +0200
commitb29b33ebb9ae80a95e7d09eb537e0fccc5043d68 (patch)
treebbd2c2642784757885d150ba0c598877f6f3e9d7 /dragonflybsd
parentb2ada278403e643a3bc339783740f262b7879803 (diff)
{Memory,Swap}Meter: add "compressed memory" metrics
For now, the semantics are mostly fit for Linux zswap subsystem. For instance, we add the third swap usage metric that indicates the amount of memory that is accounted to swap but in fact stored elsewhere. This exactly matches the definition of frontswap/zswap, and is probably of little use to all other platforms.
Diffstat (limited to 'dragonflybsd')
-rw-r--r--dragonflybsd/Platform.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c
index ab21d365..99527642 100644
--- a/dragonflybsd/Platform.c
+++ b/dragonflybsd/Platform.c
@@ -215,6 +215,7 @@ void Platform_setMemoryValues(Meter* this) {
this->values[MEMORY_METER_USED] = pl->usedMem;
this->values[MEMORY_METER_BUFFERS] = pl->buffersMem;
// this->values[MEMORY_METER_SHARED] = "shared memory, like tmpfs and shm"
+ // mtr->values[MEMORY_METER_COMPRESSED] = "compressed memory, like zswap on linux"
this->values[MEMORY_METER_CACHE] = pl->cachedMem;
// this->values[MEMORY_METER_AVAILABLE] = "available memory"
}
@@ -223,7 +224,8 @@ void Platform_setSwapValues(Meter* this) {
const ProcessList* pl = this->pl;
this->total = pl->totalSwap;
this->values[SWAP_METER_USED] = pl->usedSwap;
- this->values[SWAP_METER_CACHE] = NAN;
+ // mtr->values[SWAP_METER_CACHE] = "pages that are both in swap and RAM, like SwapCached on linux"
+ // mtr->values[SWAP_METER_FRONTSWAP] = "pages that are accounted to swap but stored elsewhere, like frontswap on linux"
}
char* Platform_getProcessEnv(pid_t pid) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy