[patch] kernel_flag is not needed on UP+preempt

From: Robert Love (rml@tech9.net)
Date: Wed Feb 12 2003 - 01:29:00 EST


There is no reason to define and declare the actual kernel_flag spinlock
on UP systems, even if kernel preemption is enabled.

Preempt needs to use the lock_kernel() calls, but it does not need the
actual lock to exist.

So change the check from SMP || PREEMPT to just SMP. Tests fine. Patch
is against 2.5.60.

        Robert Love

 kernel/sched.c | 2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -urN linux-2.5.60-mm1/kernel/sched.c linux/kernel/sched.c
--- linux-2.5.60-mm1/kernel/sched.c 2003-02-12 00:28:51.788915192 -0500
+++ linux/kernel/sched.c 2003-02-12 00:29:10.539064736 -0500
@@ -2644,7 +2644,7 @@
 
 #endif
 
-#if CONFIG_SMP || CONFIG_PREEMPT
+#if CONFIG_SMP
 /*
  * The 'big kernel lock'
  *

-
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 : Sat Feb 15 2003 - 22:00:38 EST