From 2698483444d7d668e790c8e945ccb61a8c4e4df8 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 21 Nov 2023 08:38:27 +1100 Subject: 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. --- pcp/Metric.h | 1 - pcp/PCPMachine.c | 3 --- pcp/Platform.c | 1 - 3 files changed, 5 deletions(-) (limited to 'pcp') 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", -- cgit v1.2.3