diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 1b59e265273b..8f977d5cc515 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5031,17 +5031,16 @@ void account_idle_time(cputime_t cputime) | |||
5031 | */ | 5031 | */ |
5032 | void account_process_tick(struct task_struct *p, int user_tick) | 5032 | void account_process_tick(struct task_struct *p, int user_tick) |
5033 | { | 5033 | { |
5034 | cputime_t one_jiffy = jiffies_to_cputime(1); | 5034 | cputime_t one_jiffy_scaled = cputime_to_scaled(cputime_one_jiffy); |
5035 | cputime_t one_jiffy_scaled = cputime_to_scaled(one_jiffy); | ||
5036 | struct rq *rq = this_rq(); | 5035 | struct rq *rq = this_rq(); |
5037 | 5036 | ||
5038 | if (user_tick) | 5037 | if (user_tick) |
5039 | account_user_time(p, one_jiffy, one_jiffy_scaled); | 5038 | account_user_time(p, cputime_one_jiffy, one_jiffy_scaled); |
5040 | else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET)) | 5039 | else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET)) |
5041 | account_system_time(p, HARDIRQ_OFFSET, one_jiffy, | 5040 | account_system_time(p, HARDIRQ_OFFSET, cputime_one_jiffy, |
5042 | one_jiffy_scaled); | 5041 | one_jiffy_scaled); |
5043 | else | 5042 | else |
5044 | account_idle_time(one_jiffy); | 5043 | account_idle_time(cputime_one_jiffy); |
5045 | } | 5044 | } |
5046 | 5045 | ||
5047 | /* | 5046 | /* |