diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2009-07-29 06:15:26 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-03 08:48:35 -0400 |
commit | 42c4ab41a176ee784c0f28c0b29025a8fc34f05a (patch) | |
tree | 370393a0e02faa7a6a7d211205b31ceb74880359 /include/linux/sched.h | |
parent | ed680c4ad478d0fee9740f7d029087f181346564 (diff) |
itimers: Merge ITIMER_VIRT and ITIMER_PROF
Both cpu itimers have same data flow in the few places, this
patch make unification of code related with VIRT and PROF
itimers.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
LKML-Reference: <1248862529-6063-2-git-send-email-sgruszka@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 3ab08e4bb6b8..3b3efaddd953 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -470,6 +470,11 @@ struct pacct_struct { | |||
470 | unsigned long ac_minflt, ac_majflt; | 470 | unsigned long ac_minflt, ac_majflt; |
471 | }; | 471 | }; |
472 | 472 | ||
473 | struct cpu_itimer { | ||
474 | cputime_t expires; | ||
475 | cputime_t incr; | ||
476 | }; | ||
477 | |||
473 | /** | 478 | /** |
474 | * struct task_cputime - collected CPU time counts | 479 | * struct task_cputime - collected CPU time counts |
475 | * @utime: time spent in user mode, in &cputime_t units | 480 | * @utime: time spent in user mode, in &cputime_t units |
@@ -564,9 +569,12 @@ struct signal_struct { | |||
564 | struct pid *leader_pid; | 569 | struct pid *leader_pid; |
565 | ktime_t it_real_incr; | 570 | ktime_t it_real_incr; |
566 | 571 | ||
567 | /* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */ | 572 | /* |
568 | cputime_t it_prof_expires, it_virt_expires; | 573 | * ITIMER_PROF and ITIMER_VIRTUAL timers for the process, we use |
569 | cputime_t it_prof_incr, it_virt_incr; | 574 | * CPUCLOCK_PROF and CPUCLOCK_VIRT for indexing array as these |
575 | * values are defined to 0 and 1 respectively | ||
576 | */ | ||
577 | struct cpu_itimer it[2]; | ||
570 | 578 | ||
571 | /* | 579 | /* |
572 | * Thread group totals for process CPU timers. | 580 | * Thread group totals for process CPU timers. |