diff options
author | Nathan Scott <nathans@redhat.com> | 2023-11-21 08:38:27 +1100 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2023-11-21 08:38:27 +1100 |
commit | 2698483444d7d668e790c8e945ccb61a8c4e4df8 (patch) | |
tree | e13fc51ae788d0be414960ca08b0450fdc9a7e06 /linux/LinuxMachine.c | |
parent | 452244dc06270aff4872a3c3d9559e7da5f34ad6 (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 'linux/LinuxMachine.c')
-rw-r--r-- | linux/LinuxMachine.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/linux/LinuxMachine.c b/linux/LinuxMachine.c index 34cd5d0b..aa1ff5f8 100644 --- a/linux/LinuxMachine.c +++ b/linux/LinuxMachine.c @@ -272,25 +272,6 @@ static void LinuxMachine_scanHugePages(LinuxMachine* this) { closedir(dir); } -static inline void LinuxMachine_scanZswapInfo(LinuxMachine* this) { - const Machine* host = &this->super; - long max_pool_percent = 0; - char buf[256]; - int r; - - r = xReadfile("/sys/module/zswap/parameters/max_pool_percent", buf, 256); - if (r <= 0) { - return; - } - max_pool_percent = strtol(buf, NULL, 10); - if (max_pool_percent < 0 || max_pool_percent > 100) { - return; - } - - this->zswap.totalZswapPool = host->totalMem * max_pool_percent / 100; - /* the rest of the metrics are set in LinuxMachine_scanMemoryInfo() */ -} - static void LinuxMachine_scanZramInfo(LinuxMachine* this) { memory_t totalZram = 0; memory_t usedZramComp = 0; @@ -641,7 +622,6 @@ void Machine_scan(Machine* super) { LinuxMachine_scanHugePages(this); LinuxMachine_scanZfsArcstats(this); LinuxMachine_scanZramInfo(this); - LinuxMachine_scanZswapInfo(this); LinuxMachine_scanCPUTime(this); const Settings* settings = super->settings; |