summaryrefslogtreecommitdiffstats
path: root/pcp
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2023-11-21 08:38:27 +1100
committerNathan Scott <nathans@redhat.com>2023-11-21 08:38:27 +1100
commit2698483444d7d668e790c8e945ccb61a8c4e4df8 (patch)
treee13fc51ae788d0be414960ca08b0450fdc9a7e06 /pcp
parent452244dc06270aff4872a3c3d9559e7da5f34ad6 (diff)
Remove unused zswap pool size calculation from commit 71f5a80d9e
Quick discussion with Ivan confirmed this was a left-over from an earlier version of the zswap code and can be safely removed.
Diffstat (limited to 'pcp')
-rw-r--r--pcp/Metric.h1
-rw-r--r--pcp/PCPMachine.c3
-rw-r--r--pcp/Platform.c1
3 files changed, 0 insertions, 5 deletions
diff --git a/pcp/Metric.h b/pcp/Metric.h
index 914d7d65..e72f6e19 100644
--- a/pcp/Metric.h
+++ b/pcp/Metric.h
@@ -93,7 +93,6 @@ typedef enum Metric_ {
PCP_ZRAM_CAPACITY, /* zram.capacity */
PCP_ZRAM_ORIGINAL, /* zram.mm_stat.data_size.original */
PCP_ZRAM_COMPRESSED, /* zram.mm_stat.data_size.compressed */
- PCP_ZSWAP_MAX_POOL_PERCENT, /* sysfs.module.zswap.max_pool_percent */
PCP_MEM_ZSWAP, /* mem.util.zswap */
PCP_MEM_ZSWAPPED, /* mem.util.zswapped */
PCP_VFS_FILES_COUNT, /* vfs.files.count */
diff --git a/pcp/PCPMachine.c b/pcp/PCPMachine.c
index faf3ae96..2e872534 100644
--- a/pcp/PCPMachine.c
+++ b/pcp/PCPMachine.c
@@ -179,12 +179,9 @@ static void PCPMachine_updatePerCPUReal(PCPMachine* this, Metric metric, CPUMetr
}
static inline void PCPMachine_scanZswapInfo(PCPMachine* this) {
- const Machine* host = &this->super;
pmAtomValue value;
memset(&this->zswap, 0, sizeof(ZswapStats));
- if (Metric_values(PCP_ZSWAP_MAX_POOL_PERCENT, &value, 1, PM_TYPE_U64))
- this->zswap.totalZswapPool = host->totalMem * value.ull / 100;
if (Metric_values(PCP_MEM_ZSWAP, &value, 1, PM_TYPE_U64))
this->zswap.usedZswapComp = value.ull;
if (Metric_values(PCP_MEM_ZSWAPPED, &value, 1, PM_TYPE_U64))
diff --git a/pcp/Platform.c b/pcp/Platform.c
index 402276ae..6fc2fc51 100644
--- a/pcp/Platform.c
+++ b/pcp/Platform.c
@@ -197,7 +197,6 @@ static const char* Platform_metricNames[] = {
[PCP_ZRAM_CAPACITY] = "zram.capacity",
[PCP_ZRAM_ORIGINAL] = "zram.mm_stat.data_size.original",
[PCP_ZRAM_COMPRESSED] = "zram.mm_stat.data_size.compressed",
- [PCP_ZSWAP_MAX_POOL_PERCENT] = "sysfs.module.zswap.max_pool_percent",
[PCP_MEM_ZSWAP] = "mem.util.zswap",
[PCP_MEM_ZSWAPPED] = "mem.util.zswapped",
[PCP_VFS_FILES_COUNT] = "vfs.files.count",

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