[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#389618: ktimemon incorrectly reports slab usage



Package: kdeaddons
Version: 3.5.4-1
Tags: patch, upstream
Forwarded: 134704@bugs.kde.org

ktimemon is reporting memory used by the slab twice. Once as kernel memory and once as user memory. For small slab sizes the effect of this is not noticeable, however once the slab is allowed to grow (running updatedb will do this) it will have the effect of making all of the memory appear to be consumed. A simple inspection of /proc/meminfo will show that ktimemon is reporting an incorrect usage. This can be alarming to the user.

I have attached a patch that corrects the problem, by subtracting the kernel memory usage reported by ktimemon (this seems to only be the slab) from the user memory usage.

I have also taken the liberty of filing a report in the kde bug tracking system for this issue as well. The URL is: http://bugs.kde.org/show_bug.cgi?id=134704

James
diff -Naur kdeaddons-3.5.4-orig/kicker-applets/ktimemon/sample.cc kdeaddons-3.5.4/kicker-applets/ktimemon/sample.cc
--- kdeaddons-3.5.4-orig/kicker-applets/ktimemon/sample.cc	2006-09-26 18:35:22.000000000 +0000
+++ kdeaddons-3.5.4/kicker-applets/ktimemon/sample.cc	2006-09-26 18:32:34.000000000 +0000
@@ -425,7 +425,7 @@
 
     sample.cputotal = 
       sample.user + sample.nice + sample.kernel + sample.iowait + sample.idle;
-    sample.used = sample.mtotal - sample.free - sample.buffers - sample.cached;
+    sample.used = sample.mtotal - sample.mkernel - sample.free - sample.buffers - sample.cached;
     sample.sused = sample.stotal - sample.sfree;
 }
 

Reply to: