lkml.org 
[lkml]   [2009]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] cputime: introduce thread_group_times()
Stanislaw Gruszka wrote:
> Idea is very good IMHO.

Thank you very much!

>> #ifndef CONFIG_VIRT_CPU_ACCOUNTING
>> - cputime_t prev_utime, prev_stime;
>> + cputime_t prev_utime, prev_stime, prev_tgutime, prev_tgstime;
>> #endif
>
> I think the new values should be part of struct_signal (see below)

Good point. I'll update patch to do so.

>> /*
>> + * Must be called with siglock held.
>> + */
>> +void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
>> +{
>> + struct task_cputime cputime;
>> +
>> + __thread_group_times(p, &cputime);
>> +
>> + if (ut)
>> + *ut = cputime.utime;
>> + if (st)
>> + *st = cputime.stime;
>
> No thread_group_times() nor task_times() is called with NULL arguments, we
> can get rid of "if ({u,s}t)" checks. Perhaps thread_group_times() should
> have "struct task_cputime" argument as it is wrapper for
> thread_group_cputime();

Removing "if ({u,s}t)" is OK with me.
I expect all thread_group_times() user should have no interest in members
of struct task_cputime other than {u,s}time, so I'd like to keep the
argument as is.


Thanks,
H.Seto



\
 
 \ /
  Last update: 2009-12-01 02:05    [W:0.100 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site