lkml.org 
[lkml]   [1997]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: SMP update: 2.1.30

On 27 Mar 1997, Linus Torvalds wrote:

[...]
> However, the change is quite fundamental, and I'd ask anybody who is
> running Linux/SMP to try out the new kernel if you're at all willing to
> test bleeding-edge stuff. I haven't yet much looked into the impact of
> the new code on uni-processor machines, but I'd certainly appreciate
> comments and potential patches for UP-related issues too...

sched_yield() is slightly broken, here is a (tested) fix:

--- linux-2.1.30_vanilla/kernel/sched.c Fri Mar 28 12:32:36 1997
+++ linux/kernel/sched.c Fri Mar 28 16:20:39 1997
@@ -1553,11 +1553,11 @@

asmlinkage int sys_sched_yield(void)
{
- spin_unlock(&scheduler_lock);
+ spin_lock(&scheduler_lock);
spin_lock_irq(&runqueue_lock);
move_last_runqueue(current);
spin_unlock_irq(&runqueue_lock);
- spin_lock(&scheduler_lock);
+ spin_unlock(&scheduler_lock);
need_resched = 1;
return 0;
}

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