[lkml]   [2001]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.4.17 absurd number of context switches
On Fri, 28 Dec 2001, Alan Cox wrote:

> > local_irq_disable();
> > if (current->counter > 0)
> > --current->counter;
> > local_irq_enable();
> Umm: SuS sayeth..
> 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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:14    [W:0.072 / U:3.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site