Re: O(1) batch scheduler

Ingo Molnar (mingo@elte.hu)
Thu, 11 Jul 2002 08:32:28 +0200 (CEST)


On Tue, 9 Jul 2002, Kevin O'Connor wrote:

> - rq->idle_ticks_left = IDLE_TICKS;
> - for (i = IDLE_SLOTS-1; i > 0; i--)
> - rq->idle_count[i] = rq->idle_count[i-1];
> - rq->idle_count[0] = 0;
> - rq->idle_avg = recalc_idle_avg(rq);
> + rq->idle_avg = (rq->idle_avg * (IDLE_SLOTS - 1)
> + + rq->idle_count) / IDLE_SLOTS;
> + rq->idle_count = 0;

this part is buggy: ->idle_ticks_left needs to be reset in this branch.

Ingo

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