diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2009-12-02 09:26:47 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-02 17:32:39 +0100 |
commit | d99ca3b977fc5a93141304f571475c2af9e6c1c5 (patch) | |
tree | 7665ebdafcef46c310055021562e6629f59eafd5 /kernel/fork.c | |
parent | Revert "sched, x86: Optimize branch hint in __switch_to()" (diff) | |
download | linux-d99ca3b977fc5a93141304f571475c2af9e6c1c5.tar.xz linux-d99ca3b977fc5a93141304f571475c2af9e6c1c5.zip |
sched, cputime: Cleanups related to task_times()
- Remove if({u,s}t)s because no one call it with NULL now.
- Use cputime_{add,sub}().
- Add ifndef-endif for prev_{u,s}time since they are used
only when !VIRT_CPU_ACCOUNTING.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Spencer Candland <spencer@bluehost.com>
Cc: Americo Wang <xiyou.wangcong@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
LKML-Reference: <4B1624C7.7040302@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 166b8c49257c..ad7cb6d1193c 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1066,8 +1066,10 @@ static struct task_struct *copy_process(unsigned long clone_flags, p->gtime = cputime_zero; p->utimescaled = cputime_zero; p->stimescaled = cputime_zero; +#ifndef CONFIG_VIRT_CPU_ACCOUNTING p->prev_utime = cputime_zero; p->prev_stime = cputime_zero; +#endif p->default_timer_slack_ns = current->timer_slack_ns; |