Skip to contentSkip to conversation

kernel_flag is not needed on UP+preempt

PATCH New Robert Love 1 participant 1 message Feb 12, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel_flag is not needed on UP+preempt

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(-)
kernel/sched.c +1 -1
diff -urN linux-2.5.60-mm1/kernel/sched.c linux/kernel/sched.c
@@ -2644,7 +2644,7 @@
 
 #endif
 
-#if CONFIG_SMP || CONFIG_PREEMPT
+#if CONFIG_SMP
 /*
  * The 'big kernel lock'
  *