lkml.org 
[lkml]   [2000]   [Mar]   [22]   [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 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/

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