lkml.org 
[lkml]   [2000]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: scheduler ignores need_resched flag in 2.2.x and 2.3.x?
On Tue, Mar 21, 2000 at 03:12:36PM +0100, Jamie Lokier wrote:
> 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.
>
> Note that even the global variable still has the ret_from_sys_call race.

Note that that "race" is not necessarily bad. It trades latency for throughput
and avoids some possible nasty loops.

You really don't want a situation where the kernel is working hard trying to
figure out exactly the most optimal process to run and dithering about it
while no real work gets done.



--
---------------------------------------------------------
Victor Yodaiken
FSMLabs: www.fsmlabs.com www.rtlinux.com
FSMLabs is a servicemark and a service of
VJY Associates L.L.C, New Mexico.


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

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