Skip to contentSkip to conversation

Fix guest time accounting going faster than user time accounting

PATCH Christian Borntraeger 2 participants 2 messages Oct 18, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Seems I overlooked this type while reviewing Laurents patch. cputime_add already adds, dont do it twice.

Avi. This should go to Linus before 2.6.24.

---
 fs/proc/array.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/array.c +1 -1
Index: linux-2.6.23/fs/proc/array.c
===================================================================
@@ -446,7 +446,7 @@ static int do_task_stat(struct task_stru
 			maj_flt += sig->maj_flt;
 			utime = cputime_add(utime, sig->utime);
 			stime = cputime_add(stime, sig->stime);
-			gtime += cputime_add(gtime, sig->gtime);
+			gtime = cputime_add(gtime, sig->gtime);
 		}
 
 		sid = signal_session(sig);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

#1 lore raw
Quoted 25 lines · Christian Borntraeger

Seems I overlooked this type while reviewing Laurents patch. cputime_add already adds, dont do it twice.

Avi. This should go to Linus before 2.6.24.

---
 fs/proc/array.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.23/fs/proc/array.c
===================================================================

fs/proc/array.c +1 -1
@@ -446,7 +446,7 @@ static int do_task_stat(struct task_stru
 			maj_flt += sig->maj_flt;
 			utime = cputime_add(utime, sig->utime);
 			stime = cputime_add(stime, sig->stime);
-			gtime += cputime_add(gtime, sig->gtime);
+			gtime = cputime_add(gtime, sig->gtime);
 		}
 
 		sid = signal_session(sig);
Signature · 9 lines
---------------- Laurent.Vivier-6ktuUTfB/[email protected]  -----------------
"Given enough eyeballs, all bugs are shallow" E. S. Raymond


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/