Messages in this thread | | | Date | Wed, 22 Mar 2000 13:23:51 -0500 (EST) | From | William Montgomery <> | Subject | Re: scheduler ignores need_resched flag in 2.2.x and 2.3.x? |
| |
On Wed, 22 Mar 2000 yodaiken@fsmlabs.com wrote:
> > > > Please read my previous posts on this thread. > > > > > > My question is why the last part of the scheduler needs to run with interrupts > > > enabled. > > > > > It doesnt need to, it just isnt necessary to disable/spin_lock interrupts > > at that time. Interrupts are only disabled when necessary, this keeps > > interrupt latency low. > > But we run perhaps 1000 instructions here during a context switch. The utility > of handling an interrupt during that time is minimal and, as shown, there > are possible bugs that need some interesting fixes. > IMHO only one bug has been shown. The critical section of the context switch is protected by a spin_lock and the task struct of the task being switched to is saved. The correct fix is to use that task struct when setting need_resched, then need_resched cannot be lost.
Why disable interrupts when we dont have to?
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/
| |