lkml.org 
[lkml]   [2009]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 92/94] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
    2.6.28-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

    commit 8916edef5888c5d8fe283714416a9ca95b4c3431 upstream.

    Impact: task stats regression fix

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

    this patch restores it.

    Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Acked-by: Roland McGrath <roland@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    kernel/sys.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/kernel/sys.c
    +++ b/kernel/sys.c
    @@ -1553,6 +1553,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-15 21:59    [W:4.060 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site