Messages in this thread Patch in this message | | | Subject | Re: 2.6.8-rc3-mm1: SCHEDSTATS compile error | Date | Mon, 09 Aug 2004 12:51:18 -0700 | From | Rick Lindsley <> |
| |
Solved it for me, although running SMP on a old slow PentiumII feels a tad odd. Other than that the system is running very well, I have to try a response test and see how it feels then.
Oh I agree, the right patch is not to run SMP, but it *is* a workaround. This patch against rc3-mm1 should let you run it UP:
Signed-off-by: Rick Lindsley <ricklind@us.ibm.com>
diff -rup linux-2.6.8-rc3-mm1/Documentation/sched-stats.txt linux-2.6.8-rc3-mm1-ss/Documentation/sched-stats.txt --- linux-2.6.8-rc3-mm1/Documentation/sched-stats.txt Thu Aug 5 11:05:40 2004 +++ linux-2.6.8-rc3-mm1-ss/Documentation/sched-stats.txt Thu Aug 5 11:37:53 2004 @@ -1,6 +1,8 @@ Version 9 of schedstats introduces support for sched_domains, which hit the mainline kernel in 2.6.7. Some counters make more sense to be -per-runqueue; other to be per-domain. +per-runqueue; other to be per-domain. Note that domains (and their associated +information) will only be pertinent and available on machines utilizing +CONFIG_SMP. In version 9 of schedstat, there is at least one level of domain statistics for each cpu listed, and there may well be more than one @@ -83,7 +85,9 @@ The last six are statistics dealing with Domain statistics ----------------- -One of these is produced per domain for each cpu described. +One of these is produced per domain for each cpu described. (Note that if +CONFIG_SMP is not defined, *no* domains are utilized and these lines +will not appear in the output.) domain<N> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 diff -rup linux-2.6.8-rc3-mm1/kernel/sched.c linux-2.6.8-rc3-mm1-ss/kernel/sched.c --- linux-2.6.8-rc3-mm1/kernel/sched.c Thu Aug 5 11:06:23 2004 +++ linux-2.6.8-rc3-mm1-ss/kernel/sched.c Thu Aug 5 12:13:51 2004 @@ -342,10 +342,11 @@ static int show_schedstat(struct seq_fil seq_printf(seq, "timestamp %lu\n", jiffies); for_each_online_cpu (cpu) { - int dcnt = 0; - runqueue_t *rq = cpu_rq(cpu); +#ifdef CONFIG_SMP + int dcnt = 0; struct sched_domain *sd; +#endif /* runqueue-specific stats */ seq_printf(seq, @@ -368,6 +369,7 @@ static int show_schedstat(struct seq_fil seq_printf(seq, "\n"); +#ifdef CONFIG_SMP /* domain-specific stats */ for_each_domain(cpu, sd) { char mask_str[NR_CPUS]; @@ -387,6 +389,7 @@ static int show_schedstat(struct seq_fil sd->sbe_pushed, sd->sbe_attempts, sd->ttwu_wake_affine, sd->ttwu_wake_balance); } +#endif } return 0; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |