提交 8916edef 编写于 作者: K KOSAKI Motohiro 提交者: Ingo Molnar

getrusage: RUSAGE_THREAD should return ru_utime and ru_stime

Impact: task stats regression fix

Original getrusage(RUSAGE_THREAD) implementation can return ru_utime and
ru_stime. But commit "f06febc9: timers: fix itimer/many thread hang" broke it.

this patch restores it.
Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: NRoland McGrath <roland@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 0a582440
...@@ -1627,6 +1627,8 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r) ...@@ -1627,6 +1627,8 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r)
utime = stime = cputime_zero; utime = stime = cputime_zero;
if (who == RUSAGE_THREAD) { if (who == RUSAGE_THREAD) {
utime = task_utime(current);
stime = task_stime(current);
accumulate_thread_rusage(p, r); accumulate_thread_rusage(p, r);
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册