* idle patches for 2.6.36.merge
@ 2010-08-15 5:22 Len Brown
2010-08-15 5:22 ` Len Brown
0 siblings, 1 reply; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: linux-kernel
The following patches are queued for 2.6.36.merge
Please let me know if you see problems with any of them.
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 12+ messages in thread
* idle patches for 2.6.36.merge
@ 2010-08-15 5:22 Len Brown
0 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: linux-kernel
The following patches are queued for 2.6.36.merge
Please let me know if you see problems with any of them.
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/5] intel_idle: delete power_policy modparam, and choose substate functions
2010-08-15 5:22 idle patches for 2.6.36.merge Len Brown
@ 2010-08-15 5:22 ` Len Brown
0 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: Len Brown, linux-kernel
From: Len Brown <len.brown@intel.com>
The idea behind power policy was that it would start off as a modparam,
and then hook into the new "global" in-kernel power vs energy tunable.
But that tunable isn't happening, so delete the hook here.
With the policy hook gone, the sub-state choice functions
do not do anything useful, so delete them from the critical path.
To handle sub-states in the future, we will advertise them
with dedicated cpuidle_state entries. That is necessary
because some of the sub-states will have substantially different
properties than their peer sub-states.
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/intel_idle.c | 43 -------------------------------------------
1 files changed, 0 insertions(+), 43 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 82c9a58..6d43bc3 100755
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -77,10 +77,8 @@ static struct cpuidle_driver intel_idle_driver = {
};
/* intel_idle.max_cstate=0 disables driver */
static int max_cstate = MWAIT_MAX_NUM_CSTATES - 1;
-static int power_policy = 7; /* 0 = max perf; 15 = max powersave */
static unsigned int mwait_substates;
-static int (*choose_substate)(int);
/* Reliable LAPIC Timer States, bit 1 for C1 etc. */
static unsigned int lapic_timer_reliable_states;
@@ -168,42 +166,6 @@ static struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES] = {
.enter = NULL }, /* disabled */
};
-/*
- * choose_tunable_substate()
- *
- * Run-time decision on which C-state substate to invoke
- * If power_policy = 0, choose shallowest substate (0)
- * If power_policy = 15, choose deepest substate
- * If power_policy = middle, choose middle substate etc.
- */
-static int choose_tunable_substate(int cstate)
-{
- unsigned int num_substates;
- unsigned int substate_choice;
-
- power_policy &= 0xF; /* valid range: 0-15 */
- cstate &= 7; /* valid range: 0-7 */
-
- num_substates = (mwait_substates >> ((cstate) * 4))
- & MWAIT_SUBSTATE_MASK;
-
- if (num_substates <= 1)
- return 0;
-
- substate_choice = ((power_policy + (power_policy + 1) *
- (num_substates - 1)) / 16);
-
- return substate_choice;
-}
-
-/*
- * choose_zero_substate()
- */
-static int choose_zero_substate(int cstate)
-{
- return 0;
-}
-
/**
* intel_idle
* @dev: cpuidle_device
@@ -221,8 +183,6 @@ static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state)
cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1;
- eax = eax + (choose_substate)(cstate);
-
local_irq_disable();
if (!(lapic_timer_reliable_states & (1 << (cstate))))
@@ -301,13 +261,11 @@ static int intel_idle_probe(void)
case 0x25: /* Westmere */
case 0x2C: /* Westmere */
cpuidle_state_table = nehalem_cstates;
- choose_substate = choose_tunable_substate;
break;
case 0x1C: /* 28 - Atom Processor */
lapic_timer_reliable_states = (1 << 2) | (1 << 1); /* C2, C1 */
cpuidle_state_table = atom_cstates;
- choose_substate = choose_zero_substate;
break;
#ifdef FUTURE_USE
case 0x17: /* 23 - Core 2 Duo */
@@ -447,7 +405,6 @@ static void __exit intel_idle_exit(void)
module_init(intel_idle_init);
module_exit(intel_idle_exit);
-module_param(power_policy, int, 0644);
module_param(max_cstate, int, 0444);
MODULE_AUTHOR("Len Brown <len.brown@intel.com>");
--
1.7.2.1.95.g3d045
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/5] intel_idle: delete power_policy modparam, and choose substate functions
@ 2010-08-15 5:22 ` Len Brown
0 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: linux-kernel, Len Brown
From: Len Brown <len.brown@intel.com>
The idea behind power policy was that it would start off as a modparam,
and then hook into the new "global" in-kernel power vs energy tunable.
But that tunable isn't happening, so delete the hook here.
With the policy hook gone, the sub-state choice functions
do not do anything useful, so delete them from the critical path.
To handle sub-states in the future, we will advertise them
with dedicated cpuidle_state entries. That is necessary
because some of the sub-states will have substantially different
properties than their peer sub-states.
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/intel_idle.c | 43 -------------------------------------------
1 files changed, 0 insertions(+), 43 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 82c9a58..6d43bc3 100755
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -77,10 +77,8 @@ static struct cpuidle_driver intel_idle_driver = {
};
/* intel_idle.max_cstate=0 disables driver */
static int max_cstate = MWAIT_MAX_NUM_CSTATES - 1;
-static int power_policy = 7; /* 0 = max perf; 15 = max powersave */
static unsigned int mwait_substates;
-static int (*choose_substate)(int);
/* Reliable LAPIC Timer States, bit 1 for C1 etc. */
static unsigned int lapic_timer_reliable_states;
@@ -168,42 +166,6 @@ static struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES] = {
.enter = NULL }, /* disabled */
};
-/*
- * choose_tunable_substate()
- *
- * Run-time decision on which C-state substate to invoke
- * If power_policy = 0, choose shallowest substate (0)
- * If power_policy = 15, choose deepest substate
- * If power_policy = middle, choose middle substate etc.
- */
-static int choose_tunable_substate(int cstate)
-{
- unsigned int num_substates;
- unsigned int substate_choice;
-
- power_policy &= 0xF; /* valid range: 0-15 */
- cstate &= 7; /* valid range: 0-7 */
-
- num_substates = (mwait_substates >> ((cstate) * 4))
- & MWAIT_SUBSTATE_MASK;
-
- if (num_substates <= 1)
- return 0;
-
- substate_choice = ((power_policy + (power_policy + 1) *
- (num_substates - 1)) / 16);
-
- return substate_choice;
-}
-
-/*
- * choose_zero_substate()
- */
-static int choose_zero_substate(int cstate)
-{
- return 0;
-}
-
/**
* intel_idle
* @dev: cpuidle_device
@@ -221,8 +183,6 @@ static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state)
cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1;
- eax = eax + (choose_substate)(cstate);
-
local_irq_disable();
if (!(lapic_timer_reliable_states & (1 << (cstate))))
@@ -301,13 +261,11 @@ static int intel_idle_probe(void)
case 0x25: /* Westmere */
case 0x2C: /* Westmere */
cpuidle_state_table = nehalem_cstates;
- choose_substate = choose_tunable_substate;
break;
case 0x1C: /* 28 - Atom Processor */
lapic_timer_reliable_states = (1 << 2) | (1 << 1); /* C2, C1 */
cpuidle_state_table = atom_cstates;
- choose_substate = choose_zero_substate;
break;
#ifdef FUTURE_USE
case 0x17: /* 23 - Core 2 Duo */
@@ -447,7 +405,6 @@ static void __exit intel_idle_exit(void)
module_init(intel_idle_init);
module_exit(intel_idle_exit);
-module_param(power_policy, int, 0644);
module_param(max_cstate, int, 0444);
MODULE_AUTHOR("Len Brown <len.brown@intel.com>");
--
1.7.2.1.95.g3d045
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/5] intel_idle: add support for Westmere-EX
2010-08-15 5:22 ` Len Brown
@ 2010-08-15 5:22 ` Len Brown
-1 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: Len Brown, linux-kernel
From: Len Brown <len.brown@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/intel_idle.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 6d43bc3..97655ed 100755
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -256,6 +256,7 @@ static int intel_idle_probe(void)
case 0x1E: /* Core i7 and i5 Processor - Lynnfield Jasper Forest */
case 0x1F: /* Core i7 and i5 Processor - Nehalem */
case 0x2E: /* Nehalem-EX Xeon */
+ case 0x2F: /* Westmere-EX Xeon */
lapic_timer_reliable_states = (1 << 1); /* C1 */
case 0x25: /* Westmere */
--
1.7.2.1.95.g3d045
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/5] intel_idle: add support for Westmere-EX
@ 2010-08-15 5:22 ` Len Brown
0 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: linux-kernel, Len Brown
From: Len Brown <len.brown@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/intel_idle.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 6d43bc3..97655ed 100755
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -256,6 +256,7 @@ static int intel_idle_probe(void)
case 0x1E: /* Core i7 and i5 Processor - Lynnfield Jasper Forest */
case 0x1F: /* Core i7 and i5 Processor - Nehalem */
case 0x2E: /* Nehalem-EX Xeon */
+ case 0x2F: /* Westmere-EX Xeon */
lapic_timer_reliable_states = (1 << 1); /* C1 */
case 0x25: /* Westmere */
--
1.7.2.1.95.g3d045
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/5] intel_idle: disable module support
2010-08-15 5:22 ` Len Brown
(?)
(?)
@ 2010-08-15 5:22 ` Len Brown
-1 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: Len Brown, linux-kernel
From: Len Brown <len.brown@intel.com>
Right now the module capability is cauing more trouble
than it is worth. At least one distro built intel_idle as a module
where it lost the init race with ACPI, making it useless.
Make intel_idle bool so that if you select it, you will use it.
We can restore module capability after cpuidle is enhanced
to handle run-time changing of idle drivers.
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/idle/Kconfig b/drivers/idle/Kconfig
index fb5c518..82e4e86 100644
--- a/drivers/idle/Kconfig
+++ b/drivers/idle/Kconfig
@@ -1,5 +1,5 @@
config INTEL_IDLE
- tristate "Cpuidle Driver for Intel Processors"
+ bool "Cpuidle Driver for Intel Processors"
depends on CPU_IDLE
depends on X86
depends on CPU_SUP_INTEL
--
1.7.2.1.95.g3d045
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/5] intel_idle: disable module support
2010-08-15 5:22 ` Len Brown
` (2 preceding siblings ...)
(?)
@ 2010-08-15 5:22 ` Len Brown
-1 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: linux-kernel, Len Brown
From: Len Brown <len.brown@intel.com>
Right now the module capability is cauing more trouble
than it is worth. At least one distro built intel_idle as a module
where it lost the init race with ACPI, making it useless.
Make intel_idle bool so that if you select it, you will use it.
We can restore module capability after cpuidle is enhanced
to handle run-time changing of idle drivers.
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/idle/Kconfig b/drivers/idle/Kconfig
index fb5c518..82e4e86 100644
--- a/drivers/idle/Kconfig
+++ b/drivers/idle/Kconfig
@@ -1,5 +1,5 @@
config INTEL_IDLE
- tristate "Cpuidle Driver for Intel Processors"
+ bool "Cpuidle Driver for Intel Processors"
depends on CPU_IDLE
depends on X86
depends on CPU_SUP_INTEL
--
1.7.2.1.95.g3d045
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/5] intel_idle: no longer EXPERIMENTAL
2010-08-15 5:22 ` Len Brown
` (3 preceding siblings ...)
(?)
@ 2010-08-15 5:22 ` Len Brown
-1 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: Len Brown, linux-kernel
From: Len Brown <len.brown@intel.com>
This is a fully supported driver.
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/Kconfig | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/idle/Kconfig b/drivers/idle/Kconfig
index 82e4e86..8489eb5 100644
--- a/drivers/idle/Kconfig
+++ b/drivers/idle/Kconfig
@@ -3,7 +3,6 @@ config INTEL_IDLE
depends on CPU_IDLE
depends on X86
depends on CPU_SUP_INTEL
- depends on EXPERIMENTAL
help
Enable intel_idle, a cpuidle driver that includes knowledge of
native Intel hardware idle features. The acpi_idle driver
--
1.7.2.1.95.g3d045
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/5] intel_idle: no longer EXPERIMENTAL
2010-08-15 5:22 ` Len Brown
` (4 preceding siblings ...)
(?)
@ 2010-08-15 5:22 ` Len Brown
-1 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: linux-kernel, Len Brown
From: Len Brown <len.brown@intel.com>
This is a fully supported driver.
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/Kconfig | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/idle/Kconfig b/drivers/idle/Kconfig
index 82e4e86..8489eb5 100644
--- a/drivers/idle/Kconfig
+++ b/drivers/idle/Kconfig
@@ -3,7 +3,6 @@ config INTEL_IDLE
depends on CPU_IDLE
depends on X86
depends on CPU_SUP_INTEL
- depends on EXPERIMENTAL
help
Enable intel_idle, a cpuidle driver that includes knowledge of
native Intel hardware idle features. The acpi_idle driver
--
1.7.2.1.95.g3d045
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/5] intel_idle: recognize Lincroft Atom Processor
2010-08-15 5:22 ` Len Brown
` (5 preceding siblings ...)
(?)
@ 2010-08-15 5:22 ` Len Brown
-1 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: Len Brown, Arjan van de Ven, linux-kernel
From: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/intel_idle.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 97655ed..b1909fb 100755
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -265,6 +265,7 @@ static int intel_idle_probe(void)
break;
case 0x1C: /* 28 - Atom Processor */
+ case 0x26: /* 38 - Lincroft Atom Processor */
lapic_timer_reliable_states = (1 << 2) | (1 << 1); /* C2, C1 */
cpuidle_state_table = atom_cstates;
break;
--
1.7.2.1.95.g3d045
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/5] intel_idle: recognize Lincroft Atom Processor
2010-08-15 5:22 ` Len Brown
` (6 preceding siblings ...)
(?)
@ 2010-08-15 5:22 ` Len Brown
-1 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2010-08-15 5:22 UTC (permalink / raw)
To: linux-pm; +Cc: linux-kernel, Arjan van de Ven, Len Brown
From: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/intel_idle.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 97655ed..b1909fb 100755
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -265,6 +265,7 @@ static int intel_idle_probe(void)
break;
case 0x1C: /* 28 - Atom Processor */
+ case 0x26: /* 38 - Lincroft Atom Processor */
lapic_timer_reliable_states = (1 << 2) | (1 << 1); /* C2, C1 */
cpuidle_state_table = atom_cstates;
break;
--
1.7.2.1.95.g3d045
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-08-15 5:22 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-15 5:22 idle patches for 2.6.36.merge Len Brown
2010-08-15 5:22 ` [PATCH 1/5] intel_idle: delete power_policy modparam, and choose substate functions Len Brown
2010-08-15 5:22 ` Len Brown
2010-08-15 5:22 ` [PATCH 2/5] intel_idle: add support for Westmere-EX Len Brown
2010-08-15 5:22 ` Len Brown
2010-08-15 5:22 ` [PATCH 3/5] intel_idle: disable module support Len Brown
2010-08-15 5:22 ` Len Brown
2010-08-15 5:22 ` [PATCH 4/5] intel_idle: no longer EXPERIMENTAL Len Brown
2010-08-15 5:22 ` Len Brown
2010-08-15 5:22 ` [PATCH 5/5] intel_idle: recognize Lincroft Atom Processor Len Brown
2010-08-15 5:22 ` Len Brown
-- strict thread matches above, loose matches on Subject: below --
2010-08-15 5:22 idle patches for 2.6.36.merge Len Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.