Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73395
b: refs/heads/master
c: 9a41785
h: refs/heads/master
i:
  73393: 8ea5bfe
  73391: a7814db
v: v3
  • Loading branch information
Balbir Singh authored and Ingo Molnar committed Nov 9, 2007
1 parent 89ab8ac commit ed4462e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b2be5e96dc0b5a179cf4cb98e65cfb605752ca26
refs/heads/master: 9a41785cc43d88397f787a651ed7286a33f8462f
11 changes: 6 additions & 5 deletions trunk/kernel/sched_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

/*
Expand All @@ -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);
Expand Down Expand Up @@ -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 */

0 comments on commit ed4462e

Please sign in to comment.