RFA: Changing scheduler quantum (Was: REQUEST: OpenLDAP 2.3.7)

Matthew E. Lauterbach mlauterbach at mail.wtamu.edu
Mon Sep 19 01:44:54 UTC 2005


On Sun, 2005-09-18 at 23:53 +0200, Bernardo Innocenti wrote:
> Each and every call to sched_yield() makes the process
> sleep for over *50ms* while a "nice make bootstrap" is
> running in the background:

sched_yield() not only yields the processor and current timeslice, but
also moves the process to the expired queue.  It will remain there until
the next time schedule() runs to reassign priorities and timeslices.
So, you are having to wait for the make process to use it's timeslice
and for the kernel to run schedule().  Could very easily be 50ms.  I
don't really know.  Btw, the man page for sched_yield() is out of date
on my box.  It's from Linux 1.3.81.  Everything has changed with the
introduction of the O(1) scheduler.  Before it just moved your process
to the end of its queue, now it moves the process to the expired queue.
sched_yield() should only be used if you don't need the processor back
for a while.

Matthew E. Lauterbach




More information about the fedora-devel-list mailing list