lkml.org 
[lkml]   [2009]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime

I believe that's bugfix. not new implement.

==
Subject: [PATCH] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
Impact: regression fix

Original getrusage(RUSAGE_THREAD) implementation can return ru_utime and ru_stime.
but unforunately commit f06febc96ba8e0af80bcc3eaec0a109e88275fac break it.

this patch restore it.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: Roland McGrath <roland@redhat.com>
CC: Sripathi Kodi <sripathik@in.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
CC: Frank Mayhar <fmayhar@google.com>
---
kernel/sys.c | 2 ++
1 file changed, 2 insertions(+)

Index: b/kernel/sys.c
===================================================================
--- a/kernel/sys.c 2009-01-04 05:01:15.000000000 +0900
+++ b/kernel/sys.c 2009-01-04 05:35:51.000000000 +0900
@@ -1551,6 +1551,8 @@ static void k_getrusage(struct task_stru
utime = stime = cputime_zero;

if (who == RUSAGE_THREAD) {
+ utime = task_utime(current);
+ stime = task_stime(current);
accumulate_thread_rusage(p, r);
goto out;
}



\
 
 \ /
  Last update: 2009-01-03 21:43    [W:0.084 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site