diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:46:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:46:15 -0400 |
commit | 31bbb9b58d1e8ebcf2b28c95c2250a9f8e31e397 (patch) | |
tree | 6bb0c0490d66d32eca43e73abb28d8b3ab0e7b91 /kernel/sched.c | |
parent | ff830b8e5f999d1ccbd0282a666520f0b557daa4 (diff) | |
parent | 3f0a525ebf4b8ef041a332bbe4a73aee94bb064b (diff) |
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
itimers: Add tracepoints for itimer
hrtimer: Add tracepoint for hrtimers
timers: Add tracepoints for timer_list timers
cputime: Optimize jiffies_to_cputime(1)
itimers: Simplify arm_timer() code a bit
itimers: Fix periodic tics precision
itimers: Merge ITIMER_VIRT and ITIMER_PROF
Trivial header file include conflicts in kernel/fork.c
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 0ac9053c21d6..2f76e06bea58 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5092,17 +5092,16 @@ void account_idle_time(cputime_t cputime) | |||
5092 | */ | 5092 | */ |
5093 | void account_process_tick(struct task_struct *p, int user_tick) | 5093 | void account_process_tick(struct task_struct *p, int user_tick) |
5094 | { | 5094 | { |
5095 | cputime_t one_jiffy = jiffies_to_cputime(1); | 5095 | cputime_t one_jiffy_scaled = cputime_to_scaled(cputime_one_jiffy); |
5096 | cputime_t one_jiffy_scaled = cputime_to_scaled(one_jiffy); | ||
5097 | struct rq *rq = this_rq(); | 5096 | struct rq *rq = this_rq(); |
5098 | 5097 | ||
5099 | if (user_tick) | 5098 | if (user_tick) |
5100 | account_user_time(p, one_jiffy, one_jiffy_scaled); | 5099 | account_user_time(p, cputime_one_jiffy, one_jiffy_scaled); |
5101 | else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET)) | 5100 | else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET)) |
5102 | account_system_time(p, HARDIRQ_OFFSET, one_jiffy, | 5101 | account_system_time(p, HARDIRQ_OFFSET, cputime_one_jiffy, |
5103 | one_jiffy_scaled); | 5102 | one_jiffy_scaled); |
5104 | else | 5103 | else |
5105 | account_idle_time(one_jiffy); | 5104 | account_idle_time(cputime_one_jiffy); |
5106 | } | 5105 | } |
5107 | 5106 | ||
5108 | /* | 5107 | /* |