lkml.org 
[lkml]   [2002]   [Dec]   [9]   [last100]   RSS-feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Complete thread (EXPERIMENTAL)
/
DateMon, 09 Dec 2002 04:27:56 -0800
Fromgeorge anzinger <>
SubjectRe: [PATCH 1/3] High-res-timers part 1 (core) take 20
Digg This
Arjan van de Ven wrote:

On Sun, Dec 08, 2002 at 11:03:13PM -0800, george anzinger wrote:
Arjan van de Ven wrote:

On Sun, 2002-12-08 at 08:46, george anzinger wrote:
+/*
+ * Here is an SMP helping macro...
+ */
+#ifdef CONFIG_SMP
+#define IF_SMP(a) a
+#else
+#define IF_SMP(a)
+#endif

ehmmmmm personally I would consider any need of this ugly and evil
+ IF_SMP(if (old_base && (new_base != old_base)) + spin_unlock(&old_base->lock);
+ )

Like here..... SMP dependent ifdef's of spinlock usage... shudder
Well it does seem like a waste to do spinlock ordering code on a UP system...

that's why spinlocks are effectively nops on UP.
What you say is true of just about every spinlock user, and no they shouldn't all do some IF_SMP() thing; the spinlock itself should be (and is) zero on UP

But with preemption, they really are not nops on UP...
-- 
George Anzinger   george@mvista.com
High-res-timers: 
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
\
ISP Services
Valid XHTML 1.0!\ /
Valid CSS! Last update: 2005-03-22 12:31    [W:5.083 / U:0.140 seconds]
©2003-2005 Jasper Spaans