--- linux.old/kernel/softirq.c	Tue Jan 15 04:13:43 2002
+++ linux.new/kernel/softirq.c	Thu May  9 12:36:46 2002
@@ -95,7 +95,8 @@
 		local_irq_disable();
 
 		pending = softirq_pending(cpu);
-		if (pending & mask) {
+		if ((pending && current==idle_task(cpu) && !current->need_resched )
+		    || (pending & mask) ) {
 			mask &= ~pending;
 			goto restart;
 		}
diff -u -r linux.old/include/linux/sched.h linux.new/include/linux/sched.h
--- linux.old/include/linux/sched.h	Thu May  9 18:08:42 2002
+++ linux.new/include/linux/sched.h	Thu May  9 10:30:34 2002
@@ -936,6 +936,19 @@
 	return res;
 }
 
+#ifdef CONFIG_SMP
+
+#define idle_task(cpu) (init_tasks[cpu_number_map(cpu)])
+#define can_schedule(p,cpu) \
+	((p)->cpus_runnable & (p)->cpus_allowed & (1 << cpu))
+
+#else
+
+#define idle_task(cpu) (&init_task)
+#define can_schedule(p,cpu) (1)
+
+#endif
+
 #endif /* __KERNEL__ */
 
 #endif

diff -u -r linux.old/kernel/sched.c linux.new/kernel/sched.c
--- linux.old/kernel/sched.c	Wed May  1 10:40:26 2002
+++ linux.new/kernel/sched.c	Thu May  9 10:30:26 2002
@@ -112,18 +112,7 @@
 struct kernel_stat kstat;
 extern struct task_struct *child_reaper;
 
-#ifdef CONFIG_SMP
 
-#define idle_task(cpu) (init_tasks[cpu_number_map(cpu)])
-#define can_schedule(p,cpu) \
-	((p)->cpus_runnable & (p)->cpus_allowed & (1 << cpu))
-
-#else
-
-#define idle_task(cpu) (&init_task)
-#define can_schedule(p,cpu) (1)
-
-#endif
 
 void scheduling_functions_start_here(void) { }








