diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2012-11-21 10:26:44 -0500 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2012-11-28 11:07:57 -0500 |
commit | e80d0a1ae8bb8fee0edd37427836f108b30f596b (patch) | |
tree | 437db8b1643e39d3d114a7c0e3c913455e693b70 /kernel/sched/cputime.c | |
parent | a634f93335daa8f38180a0e576ccd68a73c36eaf (diff) |
cputime: Rename thread_group_times to thread_group_cputime_adjusted
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.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'kernel/sched/cputime.c')
-rw-r--r-- | kernel/sched/cputime.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index e56f138a23c7..7dc155371b95 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c | |||
@@ -445,13 +445,13 @@ void account_idle_ticks(unsigned long ticks) | |||
445 | * Use precise platform statistics if available: | 445 | * Use precise platform statistics if available: |
446 | */ | 446 | */ |
447 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 447 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
448 | void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st) | 448 | void task_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *st) |
449 | { | 449 | { |
450 | *ut = p->utime; | 450 | *ut = p->utime; |
451 | *st = p->stime; | 451 | *st = p->stime; |
452 | } | 452 | } |
453 | 453 | ||
454 | void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st) | 454 | void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *st) |
455 | { | 455 | { |
456 | struct task_cputime cputime; | 456 | struct task_cputime cputime; |
457 | 457 | ||
@@ -516,7 +516,7 @@ static cputime_t scale_utime(cputime_t utime, cputime_t rtime, cputime_t total) | |||
516 | return (__force cputime_t) temp; | 516 | return (__force cputime_t) temp; |
517 | } | 517 | } |
518 | 518 | ||
519 | void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st) | 519 | void task_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *st) |
520 | { | 520 | { |
521 | cputime_t rtime, utime = p->utime, total = utime + p->stime; | 521 | cputime_t rtime, utime = p->utime, total = utime + p->stime; |
522 | 522 | ||
@@ -543,7 +543,7 @@ void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st) | |||
543 | /* | 543 | /* |
544 | * Must be called with siglock held. | 544 | * Must be called with siglock held. |
545 | */ | 545 | */ |
546 | void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st) | 546 | void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *st) |
547 | { | 547 | { |
548 | struct signal_struct *sig = p->signal; | 548 | struct signal_struct *sig = p->signal; |
549 | struct task_cputime cputime; | 549 | struct task_cputime cputime; |