Re: 2.4.17 absurd number of context switches

From: Davide Libenzi (davidel@xmailserver.org)
Date: Fri Dec 28 2001 - 12:43:08 EST


On Fri, 28 Dec 2001, Alan Cox wrote:

> > local_irq_disable();
> > if (current->counter > 0)
> > --current->counter;
> > local_irq_enable();
>
> Umm: SuS sayeth..
>
> DESCRIPTION
>
> The sched_yield() function forces the running thread to relinquish the
> processor until it again becomes the head of its thread list. It takes
> no arguments.
>
> Which doesnt seem to be what you are doing.

1) the scheduler in 2.5.2-pre3 does it in a different way because the
        dynamic priority is split from the time slice.

2) the current scheduler does not permit you doing such a thing in a smart
        way so, if i've to choose i prefer an implementation that solves
        real world cases. i challenge you to measure the counter tick loss
        during the yield() call anyway. it's very easy indeed to measure
        the current behavior, like we're currently seeing

- Davide

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



This archive was generated by hypermail 2b29 : Mon Dec 31 2001 - 21:00:17 EST