PSS properly accounts for memory usage of shared libraries and is
therefore better suited when summing up memory usage of multiple
processes.
Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
ksmtuned.diff
adjust-ksm-slepp.diff
awk-printf.diff
+use-pss-instead-of-rsz.diff
--- /dev/null
+--- ksm-control-scripts/ksmtuned 2024-04-08 15:10:04.218449486 +0200
++++ ksm-control-scripts.new/ksmtuned 2024-04-08 15:10:16.214620527 +0200
+@@ -72,7 +72,7 @@
+ # calculate how much memory is committed to running qemu processes
+ local progname
+ progname=${1:-kvm}
+- ps -C "$progname" -o rsz | awk '{ sum += $1 }; END { printf ("%.0f", sum) }'
++ ps -C "$progname" -o pss= | awk '{ sum += $1 }; END { printf ("%.0f", sum) }'
+ }
+
+ free_memory () {