]> arthur.barton.de Git - netdata.git/commitdiff
properly calculate offered KSM memory
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 8 Jun 2016 12:10:05 +0000 (15:10 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 8 Jun 2016 12:10:05 +0000 (15:10 +0300)
src/sys_kernel_mm_ksm.c

index 928ac8c62639869caa94e0d7e183e8c2a04ec52b..8064cb1818e5742a02d67ab87cf3118b9a899f2b 100644 (file)
@@ -94,7 +94,7 @@ int do_sys_kernel_mm_ksm(int update_every, unsigned long long dt) {
        if(!ff_pages_to_scan) return 0; // we return 0, so that we will retry to open it next time
        pages_to_scan = strtoull(procfile_lineword(ff_pages_to_scan, 0, 0), NULL, 10);
 
        if(!ff_pages_to_scan) return 0; // we return 0, so that we will retry to open it next time
        pages_to_scan = strtoull(procfile_lineword(ff_pages_to_scan, 0, 0), NULL, 10);
 
-       offered = pages_sharing + pages_unshared + pages_volatile;
+       offered = pages_sharing + pages_shared + pages_unshared + pages_volatile;
        saved = pages_sharing - pages_shared;
 
        if(!offered || !pages_to_scan) return 0;
        saved = pages_sharing - pages_shared;
 
        if(!offered || !pages_to_scan) return 0;