reduce wakeups from smart scheduler

Bernardo Innocenti bernie at codewiz.org
Wed Oct 31 17:30:45 EDT 2007


Hello,

this X patch appeared recently on the X server tree.  We may want to
backport it to our X 1.4 brach.

What do the power management people think?

---8<---

commit 2338d5c9914e2a43c3a4f7ee0f4355ad0a1ad9e7
Author: Arjan van de Ven <arjan at linux.intel.com>
Date:   Sun Oct 28 09:37:52 2007 +0100

    reduce wakeups from smart scheduler

    The smart scheduler itimer currently always fires after each request
    (which in turn causes the CPU to wake out of idle, burning precious
    power). Rather than doing this, just stop the timer before going into
    the select() portion of the WaitFor loop. It's a cheap system call, and
    it will only get called if there's no more commands batched up from the
    active fd.

    This change also allows some of the functions to be simplified;
    setitimer() will only fail if it's passed invalid data, and we don't do
    that... so make it void and remove all the conditional code that deals
    with failure.

    The change also allows us to remove a few variables that were used for
    housekeeping between the signal handler and the main loop.

    Signed-off-by: Keith Packard <keithp at koto.keithp.com>


-- 
 \___/
 |___|   Bernardo Innocenti - http://www.codewiz.org/
  \___\  One Laptop Per Child - http://www.laptop.org/



More information about the Devel mailing list