lkml.org 
[lkml]   [2004]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: 2.6.8-rc3-mm1: SCHEDSTATS compile error
Date
From
    > This looks like it could happen if you compile without CONFIG_SMP ...
> which admittedly I have not tried since the sched-domain code was
> introduced. Adrian, was this the situation in your case?

Yes.

Ok. Please try this patch (applied to rc3-mm1).

Rick

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/
\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.092 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site