summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-08-23 21:10:27 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-23 21:10:27 -0700
commite272d4c2d0578b62a8d442ba9f08cbb28173ba46 (patch)
treeb7e71fbcec2a358e0439fe802f9c3812ae703117 /kernel
parent40efa1472ae09361922c355e742e414c6af08df4 (diff)
[PATCH] schedstat: UP fix
SMP fix -- for_each_domain() is not defined if not CONFIG_SMP, so show_schedstat needed a couple of extra ifdefs. Signed-off-by: Rick Lindsley <ricklind@us.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index d691dc5f2afc..2c22759689ab 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -483,8 +483,10 @@ static int show_schedstat(struct seq_file *seq, void *v)
seq_printf(seq, "timestamp %lu\n", jiffies);
for_each_online_cpu(cpu) {
runqueue_t *rq = cpu_rq(cpu);
+#ifdef CONFIG_SMP
struct sched_domain *sd;
int dcnt = 0;
+#endif
/* runqueue-specific stats */
seq_printf(seq,
@@ -506,6 +508,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
rq->pt_lost[itype]);
seq_printf(seq, "\n");
+#ifdef CONFIG_SMP
/* domain-specific stats */
for_each_domain(cpu, sd) {
char mask_str[NR_CPUS];
@@ -524,6 +527,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
sd->sbe_pushed, sd->sbe_attempts,
sd->ttwu_wake_affine, sd->ttwu_wake_balance);
}
+#endif
}
return 0;
}