Re: scheduler ignores need_resched flag in 2.2.x and 2.3.x?

From: William Montgomery (william@opinicus.com)
Date: Tue Mar 21 2000 - 15:17:47 EST


On Tue, 21 Mar 2000, Jun Sun wrote:

> If we were to fix *ONLY* the lost need_resched flag problem, I still
> like
> my fix a little better. However, if Ingo's fix has other benefits,
> we probably should take his.
>
If you examine the code in asmlinkage void schedule(void)
very closely you will notice that the selection of next is saved to
sched_data->curr and this is protected by spin_lock_irq/spin_unlock_irq.
So there is no need to "inherit" the need_resched from prev.

If you are really concerned with scheduling latency, Ingo's patch
is what you want. Linus has said in another thread that he didnt
accept Ingo's patch into the kernel because it is ugly for little
benefit. It may be true that adding scheduling points at numerous
places is not "pretty", but there are some real BUGS that are fixed
also and should be considered.

This case is a good example of a bug, another is the bug in the
idle code which Jamie Lokier found. That code has a race condition
which can cause the idle task to run for up to 1 jiffy (10ms in i386)
when need_resched is pending. These things are clearly wrong and should
be fixed.

Wm

-
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/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:34 EST