From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Roland McGrath <roland@redhat.com>,
Sripathi Kodi <sripathik@in.ibm.com>, Ingo Molnar <mingo@elte.hu>,
Frank Mayhar <fmayhar@google.com>,
LKML <linux-kernel@vger.kernel.org>
Cc: kosaki.motohiro@jp.fujitsu.com
Subject: [PATCH] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
Date: Sun, 4 Jan 2009 05:40:37 +0900 (JST) [thread overview]
Message-ID: <20090104053654.069C.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
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;
}
next reply other threads:[~2009-01-03 20:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-03 20:40 KOSAKI Motohiro [this message]
2009-01-03 21:06 ` Roland McGrath
2009-01-04 13:04 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090104053654.069C.KOSAKI.MOTOHIRO@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=fmayhar@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=roland@redhat.com \
--cc=sripathik@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®