lkml.org 
[lkml]   [2009]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] wait_task_zombie: do not use thread_group_cputime()
    On Mon, 15 Jun 2009 23:26:51 +0200
    Oleg Nesterov <oleg@redhat.com> wrote:

    > There is no reason for thread_group_cputime() in wait_task_zombie(),
    > there must be no other threads.
    >
    > This call was previously needed to collect the per-cpu data which
    > we do not have any longer.

    Is similar change for posix_cpu_timers_exit_group() correct and worthwhile ?

    void posix_cpu_timers_exit_group(struct task_struct *tsk)
    {
    - struct task_cputime cputime;
    + struct signal_struct *const sig = tsk->signal;

    - thread_group_cputimer(tsk, &cputime);
    cleanup_timers(tsk->signal->cpu_timers,
    - cputime.utime, cputime.stime, cputime.sum_exec_runtime);
    + cputime_add(tsk->utime, sig->utime),
    + cputime_add(tsk->stime, sig->stime),
    + tsk->se.sum_exec_runtime + sig->sum_sched_runtime);
    }

    Regards
    Stanislaw


    \
     
     \ /
      Last update: 2009-06-17 10:23    [W:0.029 / U:120.332 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site