Messages in this thread Patches in this message | | | Date | Wed, 29 Dec 1999 14:37:16 +0100 (CET) | From | Mathijs Mohlmann <> | Subject | [patch] freeing spinlock when UP. |
| |
Linus, Alan
In both stable and development branches of the kernel, when reschedule_idle is called, it is presumed, that reschedule_idle will release the spin_lock, thus call spin_unlock_irqrestore. This does not happen when the kernels are compiled this __SMP__. Artur Skawina <skawina@geocities.com> thinks this might delay servicing interrupts unnecessarily. (thanks Artur for your response).
Here's the patch against 2.2.14-pre17: diff -ruN linux-2.2.14-pre17/kernel/sched.c linux/kernel/sched.c --- linux-2.2.14-pre17/kernel/sched.c Wed Oct 20 02:14:02 1999 +++ linux/kernel/sched.c Wed Dec 29 12:22:28 1999 @@ -325,6 +325,7 @@ tsk = current; if (preemption_goodness(tsk, p, this_cpu) > 0) tsk->need_resched = 1; + spin_unlock_irqrestore(&runqueue_lock, flags); #endif }
And here's the patch against 2.3.35-pre6: --- linux-2.3.35-pre6/kernel/sched.c Fri Dec 10 23:57:11 1999 +++ linux-2.3.34-post/kernel/sched.c Wed Dec 29 12:34:05 1999 @@ -273,6 +273,7 @@ tsk = cpu_curr(this_cpu); if (preemption_goodness(tsk, p, this_cpu) > 0) tsk->need_resched = 1; + spin_unlock_irqrestore(&runqueue_lock, flags); #endif }
Can you put this in?
me
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |