properly calculate offered KSM memory
Costa Tsaousis (ktsaou) committed
Jun 8, 2016 at 15:10 UTC
ab5c7880c7bdf6058c17e869bb4ad1ab8be7eed4
1 file changed
+1
-1
src/sys_kernel_mm_ksm.c
+1
-1
@@ -94,7 +94,7 @@ int do_sys_kernel_mm_ksm(int update_every, unsigned long long dt) {
94
if(!ff_pages_to_scan) return 0; // we return 0, so that we will retry to open it next time
95
pages_to_scan = strtoull(procfile_lineword(ff_pages_to_scan, 0, 0), NULL, 10);
96
97
- offered = pages_sharing + pages_unshared + pages_volatile;
97
+ offered = pages_sharing + pages_shared + pages_unshared + pages_volatile;
98
saved = pages_sharing - pages_shared;
99
100
if(!offered || !pages_to_scan) return 0;