Re: [patch] idle_task was wasting a lot of CPU

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Mon, 30 Nov 1998 13:23:34 +0100 (CET)


On Fri, 27 Nov 1998, Linus Torvalds wrote:
> On Fri, 27 Nov 1998, Andrea Arcangeli wrote:
> >
> > The first pending patch is a fix for a bug I discovered last week. The
> > patch avoid the idle task to continue to run if an useful process is being
> > wakenup. It make a _big_ difference. Compiling the kernel a `xload' show
> > that the CPU is used at 100% all the time (5/10% kernel and the other is
> > gcc). Without this patch xload is far from doing a straight line in the
> > high part of the graph.
>
> Hmm.. The idle tasks _should_ have a negative counter value all the time,
> at least they used to. That's the proper fix, to make sure that the
> counter value is never positive in the first place.
>
> I wonder when that broke?

I thought about that too. It process.c we used to mark
the counter of each idle task to -100 and it had gone
without a reason.

Putting it back there won't really work since, on each
timer interrupt, counter will be reset to 0. IMHO the
real fix is to mark the idle task with SCHED_YIELD.
This will work because we never mangle the idle task
with goodness()... (we don't, do we?)

regards,

Rik -- now completely used to dvorak kbd layout...
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

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