lkml.org 
[lkml]   [1999]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Potential 2.2.8 scheduler bugs

On Wed, 12 May 1999, Dimitris Michailidis wrote:

> RT threads become runnable and go through reschedule_idle_slow one after the
> other. It is possible that both threads will choose to run on CPU 0. When
> CPU 0 finally reschedules it will pick the higher priority RT task and leave
> the other one on the run queue. [...]

yes, we are not yet strict enough in the 'wakeup message' passing. I
thought about setting cpu_curr in reschedule_idle() already, [being able
to do such 'deferred' things was the point in cpu_curr] but i just
chickened out for now. I'll send a patch for this (and other things like
the SCHED_YIELD stuff) to people to test this out.

> of these threads. No attempt is made to reschedule the high priority
> threads that didn't get chosen by their desired CPU, even though these
> threads may be able to run on other CPUs.

yes, 'high frequency rescheduling' still might fool the current scheduler.

> The second problem has to do with the counter recalculation. The current
> implementation suffers from race conditions. [..]

well spotted. This is rather easy to fix with a recalculation counter,
since the recalculation code is outline already. Or, there was code posted
yesterday that sets per-process recalculation timestamps as they leave and
enter the runqueue. While it certainly increases add/del_runqueue costs,
it doesnt have all these nasty side-effects.

> On another front, release() in exit.c contains the following piece of code:
>
> for (;;) {
> int has_cpu;
> spin_lock_irq(&runqueue_lock);
> has_cpu = p->has_cpu;
> spin_unlock_irq(&runqueue_lock);
> if (!has_cpu)
> break;
> do {
> barrier();
> } while (p->has_cpu);
> }

yes this is historical code, the outer loop is not needed anymore.

-- mingo


-
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:51    [W:0.179 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site