lkml.org 
[lkml]   [2000]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: [patch] scheduler bugfix, SMP, 2.4.0-test7


On Mon, 28 Aug 2000, Dimitris Michailidis wrote:
>
> On 28-Aug-2000 Ingo Molnar wrote:
>
> > the attached sched-2.4.0-test7-C1 patch fixes a 'missed wakeup'
> > SMP-scheduler bug.
>
> +running_again:
> + if (prev == idle_task(smp_processor_id()))
> + goto out_unlock;
>
> Why don't you move the test for the idle task to the beginning of the
> function so we don't need to take the run queue lock if prev is idle? There
> is nothing to be done for idle tasks, we don't even need to set ->has_cpu.

No, that's not the right solution.

I think the right solution is to completely split up "schedule()" into two
different functions (which just share 99% of the code), and basically have
the idle thread call the _other_ schedule. The one that never does the
test at all.

That way you know statically whether you are the idle thread or not. No
test at all.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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