lkml.org 
[lkml]   [2003]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch] kernel_flag is not needed on UP+preempt
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.027 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site