lkml.org 
[lkml]   [2012]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/3] cputime: Rename thread_group_times to thread_group_cputime_adjusted
From
2012/11/26 Steven Rostedt <rostedt@goodmis.org>:
> On Fri, 2012-11-23 at 15:21 +0100, Frederic Weisbecker wrote:
>> We have thread_group_cputime() and thread_group_times(). The naming
>> doesn't provide enough information about the difference between
>> these two APIs.
>>
>> To lower the confusion, rename thread_group_times() to
>> thread_group_cputime_adjusted(). This name better suggests that
>> it's a version of thread_group_cputime() that does some stabilization
>> on the raw cputime values. ie here: scale on top of CFS runtime
>> stats and bound lower value for monotonicity.
>
> But, thread_group_times() does not do any type of adjustment. It only
> retrieves the cpu times:
>
> void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
> {
> struct task_cputime cputime;
>
> thread_group_cputime(p, &cputime);
>
> *ut = cputime.utime;
> *st = cputime.stime;
> }

This is the CONFIG_VIRT_CPU_ACCOUNTING only version. It also needs
some monotonicity guard IMO but that's another issue.
But please look at the other version.

> It retrieves the current times, it doesn't adjust them.
>
> I'm thinking the current name is more accurate.


\
 
 \ /
  Last update: 2012-11-26 21:01    [W:0.062 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site