Oops, I had not understood the code you provided. Now, I see your
point.
I think that I've found the cause of the problem.
--------------------------- kernel/sched.c
asmlinkage int sys_sched_yield(void)
{
spin_lock_irq(&runqueue_lock);
if (current->policy == SCHED_OTHER) <---------- This line.
current->policy |= SCHED_YIELD;
current->need_resched = 1;
move_last_runqueue(current);
spin_unlock_irq(&runqueue_lock);
return 0;
}
---------------------------
This line was introduced on November 1998 in the patch-2.1.127.
Without this conditional (set SCHED_YIELD flag regardless of policy),
I guess it works fine.
Could someone try? I don't have single CPU machine at hand.
-- Niibe Yutaka- 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/