Re: 2.4.17 absurd number of context switches

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


On Fri, 28 Dec 2001, Stephan von Krawczynski wrote:

> On Fri, 28 Dec 2001 09:07:48 -0800 (PST)
> Davide Libenzi <davidel@xmailserver.org> wrote:
>
> > The scheduler that Linus merged in 2.5.2-pre3 will solve the problem.
>
> Could you kindly provide a patch for 2.4.17 for Jeffrey to test and give
> comparison results to the list. This could be interesting for 2.4 too (which
> the world uses nowadays (and in the near future))?
>
> Thanks for your help ;-)

You can't, the scheduler is changed.
Try this, in sys_sched_yield() remove :

        spin_lock_irq(&runqueue_lock);
        move_last_runqueue(current);
        spin_unlock_irq(&runqueue_lock);

and replace it with :

        local_irq_disable();
        if (current->counter > 0)
            --current->counter;
        local_irq_enable();

- 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