* [PATCH] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
@ 2009-01-03 20:40 KOSAKI Motohiro
2009-01-03 21:06 ` Roland McGrath
0 siblings, 1 reply; 3+ messages in thread
From: KOSAKI Motohiro @ 2009-01-03 20:40 UTC (permalink / raw)
To: Roland McGrath, Sripathi Kodi, Ingo Molnar, Frank Mayhar, LKML
Cc: kosaki.motohiro
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;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
2009-01-03 20:40 [PATCH] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime KOSAKI Motohiro
@ 2009-01-03 21:06 ` Roland McGrath
2009-01-04 13:04 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Roland McGrath @ 2009-01-03 21:06 UTC (permalink / raw)
To: KOSAKI Motohiro; +Cc: Sripathi Kodi, Ingo Molnar, Frank Mayhar, LKML
I think you're right. Good catch.
Acked-by: Roland McGrath <roland@redhat.com>
Thanks,
Roland
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
2009-01-03 21:06 ` Roland McGrath
@ 2009-01-04 13:04 ` Ingo Molnar
0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2009-01-04 13:04 UTC (permalink / raw)
To: Roland McGrath; +Cc: KOSAKI Motohiro, Sripathi Kodi, Frank Mayhar, LKML
* Roland McGrath <roland@redhat.com> wrote:
> I think you're right. Good catch.
>
> Acked-by: Roland McGrath <roland@redhat.com>
applied to tip/sched/urgent, thanks guys!
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-04 13:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-03 20:40 [PATCH] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime KOSAKI Motohiro
2009-01-03 21:06 ` Roland McGrath
2009-01-04 13:04 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®