lkml.org 
[lkml]   [2006]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH: 2.6.18.1] delayacct: cpu_count in taskstats updated correctly
from: Martin T. Setek <martitse@ifi.uio.no>

cpu_count in struct taskstats should be the same as the corresponding
(third) value found in /proc/<pid>/schedstat
Signed-off-by: <martitse@ifi.uio.no>
---
Index: linux-2.6.18.1/kernel/delayacct.c
===================================================================
--- linux-2.6.18.1.orig/kernel/delayacct.c
+++ linux-2.6.18.1/kernel/delayacct.c
@@ -124,7 +124,7 @@ int __delayacct_add_tsk(struct taskstats
t2 = tsk->sched_info.run_delay;
t3 = tsk->sched_info.cpu_time;

- d->cpu_count += t1;
+ d->cpu_count = t1;

jiffies_to_timespec(t2, &ts);
tmp = (s64)d->cpu_delay_total + timespec_to_ns(&ts);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-10-27 05:21    [W:1.147 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site