LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC][PATCH 0/3] A Dynticks Aware Processor Idle PM Governor
@ 2007-03-24  7:46 Adam Belay
  2007-06-01  1:17 ` Len Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Belay @ 2007-03-24  7:46 UTC (permalink / raw)
  To: Len Brown, Thomas Gleixner
  Cc: linux-kernel, Andrew Morton, Shaohua Li, Pallipadi, Venkatesh,
	linux-acpi

Hi All,

Here is my first take at implementing an idle PM governor that takes
full advantage of NO_HZ.  I call it the 'menu' governor because it
considers the full list of idle states before each entry.

I've kept the implementation fairly simple.  It attempts to guess the
next residency time and then chooses a state that would meet at least
the break-even point between power savings and entry cost.  To this end,
it selects the deepest idle state that satisfies the following
constraints:
     1. If the idle time elapsed since bus master activity was detected
        is below a threshold (currently 20 ms), then limit the selection
        to C2-type or above.
     2. Do not choose a state with a break-even residency that exceeds
        the expected time remaining until the next timer interrupt.
     3. Do not choose a state with a break-even residency that exceeds
        the elapsed time between the last pair of break events,
        excluding timer interrupts.

This governor has an advantage over "ladder" governor because it
proactively checks how much time remains until the next timer interrupt
using the tick infrastructure.  Also, it handles device interrupt
activity more intelligently by not including timer interrupts in break
event calculations.  Finally, it doesn't make policy decisions using the
number of state entries, which can have variable residency times (NO_HZ
makes these potentially very large), and instead only considers sleep
time deltas.

The menu governor can be selected during runtime using the cpuidle sysfs
interface like so:
"echo "menu" > /sys/devices/system/cpu/cpuidle/current_governor"

This patchset applies against 2.6.21-rc4 plus the latest from the acpi
testing tree, which is available here:
ftp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/test/2.6.21/acpi-test-20070126-2.6.21-rc4.diff.bz2

I'd really appreciate any comments, benchmarks, or suggestions.

Cheers,
Adam



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC][PATCH 0/3] A Dynticks Aware Processor Idle PM Governor
  2007-03-24  7:46 [RFC][PATCH 0/3] A Dynticks Aware Processor Idle PM Governor Adam Belay
@ 2007-06-01  1:17 ` Len Brown
  2007-06-06 20:49   ` [PATCH 1/8] cpuidle: acpi_set_cstate_limit compile fix Venki Pallipadi
  0 siblings, 1 reply; 3+ messages in thread
From: Len Brown @ 2007-06-01  1:17 UTC (permalink / raw)
  To: Adam Belay
  Cc: Len Brown, Thomas Gleixner, linux-kernel, Andrew Morton,
	Shaohua Li, Pallipadi, Venkatesh, linux-acpi

Applied this series to acpi-test
in anticipation that Venki is about to send some incremental
patches to address the feedback on it.

thanks,
-Len

On Saturday 24 March 2007 03:46, Adam Belay wrote:
> Hi All,
> 
> Here is my first take at implementing an idle PM governor that takes
> full advantage of NO_HZ.  I call it the 'menu' governor because it
> considers the full list of idle states before each entry.
> 
> I've kept the implementation fairly simple.  It attempts to guess the
> next residency time and then chooses a state that would meet at least
> the break-even point between power savings and entry cost.  To this end,
> it selects the deepest idle state that satisfies the following
> constraints:
>      1. If the idle time elapsed since bus master activity was detected
>         is below a threshold (currently 20 ms), then limit the selection
>         to C2-type or above.
>      2. Do not choose a state with a break-even residency that exceeds
>         the expected time remaining until the next timer interrupt.
>      3. Do not choose a state with a break-even residency that exceeds
>         the elapsed time between the last pair of break events,
>         excluding timer interrupts.
> 
> This governor has an advantage over "ladder" governor because it
> proactively checks how much time remains until the next timer interrupt
> using the tick infrastructure.  Also, it handles device interrupt
> activity more intelligently by not including timer interrupts in break
> event calculations.  Finally, it doesn't make policy decisions using the
> number of state entries, which can have variable residency times (NO_HZ
> makes these potentially very large), and instead only considers sleep
> time deltas.
> 
> The menu governor can be selected during runtime using the cpuidle sysfs
> interface like so:
> "echo "menu" > /sys/devices/system/cpu/cpuidle/current_governor"
> 
> This patchset applies against 2.6.21-rc4 plus the latest from the acpi
> testing tree, which is available here:
> ftp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/test/2.6.21/acpi-test-20070126-2.6.21-rc4.diff.bz2
> 
> I'd really appreciate any comments, benchmarks, or suggestions.
> 
> Cheers,
> Adam
> 
> 
> -
> 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/
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/8] cpuidle: acpi_set_cstate_limit compile fix
  2007-06-01  1:17 ` Len Brown
@ 2007-06-06 20:49   ` Venki Pallipadi
  0 siblings, 0 replies; 3+ messages in thread
From: Venki Pallipadi @ 2007-06-06 20:49 UTC (permalink / raw)
  To: Len Brown
  Cc: Adam Belay, Len Brown, Thomas Gleixner, linux-kernel,
	Andrew Morton, Shaohua Li, linux-acpi


Len,

Following are a bunch of small changes to cpuidle trying to prepare it
for mainline. Some of the changes are just the compile timer errors/warnings
and you probably already have them in acpi-test.

Should apply cleanly to latest acpi-test. Please include in acpi-test.

Thanks,
Venki

This patch:


cpuidle compile fix related to acpi_set_cstate_limit().

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Index: linux-2.6.22-rc-mm/drivers/acpi/osl.c
===================================================================
--- linux-2.6.22-rc-mm.orig/drivers/acpi/osl.c	2007-06-01 16:17:40.000000000 -0700
+++ linux-2.6.22-rc-mm/drivers/acpi/osl.c	2007-06-01 16:21:43.000000000 -0700
@@ -1030,6 +1030,7 @@
 	if (acpi_do_set_cstate_limit)
 		acpi_do_set_cstate_limit();
 }
+EXPORT_SYMBOL(acpi_set_cstate_limit);
 
 /*
  * Acquire a spinlock.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-06 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-24  7:46 [RFC][PATCH 0/3] A Dynticks Aware Processor Idle PM Governor Adam Belay
2007-06-01  1:17 ` Len Brown
2007-06-06 20:49   ` [PATCH 1/8] cpuidle: acpi_set_cstate_limit compile fix Venki Pallipadi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).