From ed4462e08c9646f051ddf92f4aaf0e33a6ef8c2b Mon Sep 17 00:00:00 2001 From: Balbir Singh Date: Fri, 9 Nov 2007 22:39:37 +0100 Subject: [PATCH] --- yaml --- r: 73395 b: refs/heads/master c: 9a41785cc43d88397f787a651ed7286a33f8462f h: refs/heads/master i: 73393: 8ea5bfe93ab0b7a59cf8c5658828f43d99c7ad8e 73391: a7814db8c7dc413ac396cd2c8e8975758660b8d8 v: v3 --- [refs] | 2 +- trunk/kernel/sched_stats.h | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 18f3beecfed9..205a5f34571b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b2be5e96dc0b5a179cf4cb98e65cfb605752ca26 +refs/heads/master: 9a41785cc43d88397f787a651ed7286a33f8462f diff --git a/trunk/kernel/sched_stats.h b/trunk/kernel/sched_stats.h index ef1a7df80ea2..630178e53bb6 100644 --- a/trunk/kernel/sched_stats.h +++ b/trunk/kernel/sched_stats.h @@ -127,7 +127,7 @@ rq_sched_info_depart(struct rq *rq, unsigned long long delta) # define schedstat_set(var, val) do { } while (0) #endif -#ifdef CONFIG_SCHEDSTATS +#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) /* * Called when a process is dequeued from the active array and given * the cpu. We should note that with the exception of interactive @@ -155,7 +155,7 @@ static inline void sched_info_dequeued(struct task_struct *t) */ static void sched_info_arrive(struct task_struct *t) { - unsigned long long now = sched_clock(), delta = 0; + unsigned long long now = task_rq(t)->clock, delta = 0; if (t->sched_info.last_queued) delta = now - t->sched_info.last_queued; @@ -186,7 +186,7 @@ static inline void sched_info_queued(struct task_struct *t) { if (unlikely(sched_info_on())) if (!t->sched_info.last_queued) - t->sched_info.last_queued = sched_clock(); + t->sched_info.last_queued = task_rq(t)->clock; } /* @@ -195,7 +195,8 @@ static inline void sched_info_queued(struct task_struct *t) */ static inline void sched_info_depart(struct task_struct *t) { - unsigned long long delta = sched_clock() - t->sched_info.last_arrival; + unsigned long long delta = task_rq(t)->clock - + t->sched_info.last_arrival; t->sched_info.cpu_time += delta; rq_sched_info_depart(task_rq(t), delta); @@ -231,5 +232,5 @@ sched_info_switch(struct task_struct *prev, struct task_struct *next) #else #define sched_info_queued(t) do { } while (0) #define sched_info_switch(t, next) do { } while (0) -#endif /* CONFIG_SCHEDSTATS */ +#endif /* CONFIG_SCHEDSTATS || CONFIG_TASK_DELAY_ACCT */