Re: 2.6.9-rc1-mm1

From: Rafael J. Wysocki
Date: Sat Sep 04 2004 - 13:37:26 EST


On Friday 27 of August 2004 23:54, Rick Lindsley wrote:
[- snip -]
> Okay. A schedstats patch for 2.6.8.1 is available at
>
> http://eaglet.rain.com/rick/linux/schedstat/patches/schedstat-2.6.8.1
> or
> http://oss.software.ibm.com/linux/patches/?patch_id=730
>

It seems that after applying it one has to apply the two attached patches to
the kernel to get it compile on a UP system.

Regards,
RJW

--
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.
-- Richard P. Feynman
--- orig/linux-2.6.8.1/include/linux/sched.h 2004-09-04 20:13:39.950362408 +0200
+++ linux/include/linux/sched.h 2004-09-04 19:39:10.965895856 +0200
@@ -590,6 +590,14 @@
#define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */
#define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */

+enum idle_type
+{
+ IDLE,
+ NOT_IDLE,
+ NEWLY_IDLE,
+ MAX_IDLE_TYPES
+};
+
#ifdef CONFIG_SMP
#define SCHED_LOAD_SCALE 128UL /* increase resolution of load */

@@ -601,14 +609,6 @@
#define SD_WAKE_BALANCE 32 /* Perform balancing at task wakeup */
#define SD_SHARE_CPUPOWER 64 /* Domain members share cpu power */

-enum idle_type
-{
- IDLE,
- NOT_IDLE,
- NEWLY_IDLE,
- MAX_IDLE_TYPES
-};
-
struct sched_group {
struct sched_group *next; /* Must be a circular list */
cpumask_t cpumask;
--- orig/linux-2.6.8.1/kernel/sched.c 2004-09-04 20:13:39.958361192 +0200
+++ linux/kernel/sched.c 2004-09-04 19:42:53.097126776 +0200
@@ -342,10 +342,12 @@
seq_printf(seq, "timestamp %lu\n", jiffies);
for_each_online_cpu (cpu) {

+#ifdef CONFIG_SMP
int dcnt = 0;

- runqueue_t *rq = cpu_rq(cpu);
struct sched_domain *sd;
+#endif
+ runqueue_t *rq = cpu_rq(cpu);

/* runqueue-specific stats */
seq_printf(seq,
@@ -368,6 +370,7 @@

seq_printf(seq, "\n");

+#ifdef CONFIG_SMP
/* domain-specific stats */
for_each_domain(cpu, sd) {
char mask_str[NR_CPUS];
@@ -386,6 +389,7 @@
sd->sbe_pushed, sd->sbe_attempts,
sd->ttwu_wake_affine, sd->ttwu_wake_balance);
}
+#endif
}
return 0;
}