Messages in this thread | | | Date | Tue, 21 Mar 2000 11:08:25 -0500 | From | willy@thepuffi ... | Subject | Re: scheduler ignores need_resched flag in 2.2.x and 2.3.x? |
| |
On Tue, Mar 21, 2000 at 06:09:25AM +0100, Andi Kleen wrote: > lk@tantalophile.demon.co.uk (Jamie Lokier) writes: > > > Jun Sun wrote: > > > First of all, I think this is must-fix bug. (Any arguments here?) > > > > There are a few other scenarious where need_resched is missed, including > > the last few instructions after ret_from_syscall. And it really does > > happen there. I think it's a must-fix too, but the fact that neither my > > nor Ingo's patch made it in suggests Linus thinks otherwise. > > Looks like the easiest way to fix such races would be to move need_resched > back to a global variable (possible in an array indexed per CPU). Earlier > Linux kernels (<2.0) had it this way, I'm not sure why it was changed.
Better would be to turn it into a per-architecture function. On PA-RISC, we can set a bit in the CPU to make it trap on transitions to userspace and having a set_resched() function which just sets the need_resched flag on x86 but sets the L bit on PA-RISC would mean that we could avoid checking the flag. Maybe this is a 2.5 thing though.
- 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/
| |