Linux: Add SwapCached to the swap meter

According to the Linux kernel documentation, "SwapCached" tracks "memory
that once was swapped out, is swapped back in but still also is
in the swapfile (if memory is needed it doesn't need to be swapped out
AGAIN because it is already in the swapfile. This saves I/O)."
This commit is contained in:
David Zarzycki
2021-01-07 08:38:18 -05:00
committed by BenBE
parent f4404effa4
commit 37e186fd66
11 changed files with 31 additions and 4 deletions

View File

@ -301,6 +301,7 @@ void Platform_setSwapValues(Meter* this) {
const ProcessList* pl = this->pl;
this->total = pl->totalSwap;
this->values[0] = pl->usedSwap;
this->values[1] = pl->cachedSwap;
}
void Platform_setZramValues(Meter* this) {