Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121348
b: refs/heads/master
c: 9c2c480
h: refs/heads/master
v: v3
  • Loading branch information
Ken Chen authored and Ingo Molnar committed Dec 18, 2008
1 parent e6bdf25 commit 88ebff1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 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: e9515c3c9feecd74174c2998add0db51e02abb8d
refs/heads/master: 9c2c48020ec0dd6ecd27e5a1298f73b40d85a595
2 changes: 1 addition & 1 deletion trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static int proc_pid_wchan(struct task_struct *task, char *buffer)
static int proc_pid_schedstat(struct task_struct *task, char *buffer)
{
return sprintf(buffer, "%llu %llu %lu\n",
task->sched_info.cpu_time,
task->se.sum_exec_runtime,
task->sched_info.run_delay,
task->sched_info.pcount);
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,7 @@ struct reclaim_state;
struct sched_info {
/* cumulative counters */
unsigned long pcount; /* # of times run on this cpu */
unsigned long long cpu_time, /* time spent on the cpu */
run_delay; /* time spent waiting on a runqueue */
unsigned long long run_delay; /* time spent waiting on a runqueue */

/* timestamps */
unsigned long long last_arrival,/* when we last ran on a cpu */
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/delayacct.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk)
*/
t1 = tsk->sched_info.pcount;
t2 = tsk->sched_info.run_delay;
t3 = tsk->sched_info.cpu_time;
t3 = tsk->se.sum_exec_runtime;

d->cpu_count += t1;

Expand Down
2 changes: 2 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,8 @@ struct rq {
#ifdef CONFIG_SCHEDSTATS
/* latency stats */
struct sched_info rq_sched_info;
unsigned long long rq_cpu_time;
/* could above be rq->cfs_rq.exec_clock + rq->rt_rq.rt_runtime ? */

/* sys_sched_yield() stats */
unsigned int yld_exp_empty;
Expand Down
5 changes: 2 additions & 3 deletions trunk/kernel/sched_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
rq->yld_act_empty, rq->yld_exp_empty, rq->yld_count,
rq->sched_switch, rq->sched_count, rq->sched_goidle,
rq->ttwu_count, rq->ttwu_local,
rq->rq_sched_info.cpu_time,
rq->rq_cpu_time,
rq->rq_sched_info.run_delay, rq->rq_sched_info.pcount);

seq_printf(seq, "\n");
Expand Down Expand Up @@ -123,7 +123,7 @@ static inline void
rq_sched_info_depart(struct rq *rq, unsigned long long delta)
{
if (rq)
rq->rq_sched_info.cpu_time += delta;
rq->rq_cpu_time += delta;
}

static inline void
Expand Down Expand Up @@ -236,7 +236,6 @@ static inline void sched_info_depart(struct task_struct *t)
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);

if (t->state == TASK_RUNNING)
Expand Down

0 comments on commit 88ebff1

Please sign in to comment.