lkml.org 
[lkml]   [2002]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectO(1) scheduler fix for 2.5-ia64
Date
Hi David,

this problem is wellknown and I actually thought that it was
solved. But it looks like the complex prepare_arch_switch()
etc. macros didn't make it into the 2.5 kernels for IA64. They are
needed on IA64 because we have to release the runqueue lock during
context switch. This is similar to sparc64. Thanks to John Hawks for
noticing this.

Please include this into your kernel tree.

Regards,
Erich
diff -urNp linux-2.5.45-ia64/include/asm-ia64/system.h linux-2.5.45-ia64-o1fix/include/asm-ia64/system.h
--- linux-2.5.45-ia64/include/asm-ia64/system.h Mon Nov 4 19:31:52 2002
+++ linux-2.5.45-ia64-o1fix/include/asm-ia64/system.h Mon Nov 4 19:46:35 2002
@@ -432,6 +432,18 @@ extern void ia64_load_extra (struct task
} while (0)
#endif

+#define prepare_arch_switch(rq, next) \
+do { spin_lock(&(next)->switch_lock); \
+ spin_unlock(&(rq)->lock); \
+} while (0)
+
+#define finish_arch_switch(rq, prev) \
+do { spin_unlock_irq(&(prev)->switch_lock); \
+} while (0)
+
+#define task_running(rq, p) \
+ ((rq)->curr == (p) || spin_is_locked(&(p)->switch_lock))
+
#endif /* __KERNEL__ */

#endif /* __ASSEMBLY__ */
\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.021 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site