Re: 2.5.44-mm5

From: Ravikiran G Thirumalai (kiran@in.ibm.com)
Date: Mon Oct 28 2002 - 04:02:20 EST


On Fri, Oct 25, 2002 at 12:36:45PM +0000, Dipankar Sarma wrote:
> ...
> The patch below should fix your problem, hopefully. Although I
> don't understand why kstat initialization isn't in common code.

My mistake...it should be in common code. I missed the #endif after
kernel_flag definition....and was dumb enough to think sched_init
was defined only for CONFIG_SMP || CONFIG_PREEMPT....sheesh..
Here's the fix...moves init_kstat to common code; applies on mm6

Thanks,
Kiran

 
--- mm6.orig/kernel/sched.c Mon Oct 28 11:36:57 2002
+++ mm6.fix/kernel/sched.c Mon Oct 28 11:47:39 2002
@@ -2117,6 +2117,18 @@
 #endif
 
 #if CONFIG_SMP || CONFIG_PREEMPT
+/*
+ * The 'big kernel lock'
+ *
+ * This spinlock is taken and released recursively by lock_kernel()
+ * and unlock_kernel(). It is transparently dropped and reaquired
+ * over schedule(). It is used to protect legacy code that hasn't
+ * been migrated to a proper locking design yet.
+ *
+ * Don't use in new code.
+ */
+spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+#endif
 
 static void kstat_init_cpu(int cpu)
 {
@@ -2149,21 +2161,6 @@
         register_cpu_notifier(&kstat_nb);
 }
 
-/*
- * The 'big kernel lock'
- *
- * This spinlock is taken and released recursively by lock_kernel()
- * and unlock_kernel(). It is transparently dropped and reaquired
- * over schedule(). It is used to protect legacy code that hasn't
- * been migrated to a proper locking design yet.
- *
- * Don't use in new code.
- */
-spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
-#else
-static inline void init_kstat(void) { }
-#endif
-
 void __init sched_init(void)
 {
         runqueue_t *rq;
-
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/



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:36 EST