Len Brown | 1 Apr 2011 06:24

Re: [PATCH 0/9] x86 idle cruft removal - v2

Thanks for the review feedback that this change is too sudden.
How about this plan with a 4-month delay?

cheers,
-Len Brown, Intel Open Source Technology Center

2.6.39-rc1
----------

x86 idle: deprecate floppy disable_hlt
	feature-removal.txt for 2.6.40 (4 months)
	WARN_ONCE on use
	cc: stable <at> kernel.org

x86 idle APM: deprecate apm_cpu_idle
	feature-removal.txt for 2.6.40 (4 months)
	#warning on CONFIG_APM_CPU_IDLE remove in 2.6.40
	WARN_ONCE in apm_cpu_idle()
	cc: stable <at> kernel.org

x86 idle: export pm_idle only for CONFIG_APM_MODULE
	like we do for default_idle(),
	EXPORT_SYMBOL(pm_idle) only on CONFIG_APM_MODULE

x86 idle: deprecate "no-hlt" cmdline param
	feature-removal.txt for 2.6.40 (4 months)
	cc stable <at> kernel.org
	WARN_ONCE if used, ask if idle=poll is sufficient
	same as idle=poll, except no-hlt also disables
		HLT in machine_halt().
(Continue reading)

Len Brown | 1 Apr 2011 07:59

[PATCH 2.6.39 & -stable] x86 intel power: Initialize MSR_IA32_ENERGY_PERF_BIAS

From: Len Brown <len.brown <at> intel.com>

Since 2.6.36 (23016bf0d25), Linux prints the existence of "epb" in /proc/cpuinfo,
Since 2.6.38 (d5532ee7b40), the x86_energy_perf_policy(8) utility has
been available in-tree to update MSR_IA32_ENERGY_PERF_BIAS.

However, the typical BIOS fails to initialize the MSR, presumably
because this is handled by high-volume shrink-wrap operating systems...

Linux distros, on the other hand, do not yet invoke x86_energy_perf_policy(8).
As a result, WSM-EP, SNB, and later hardware from Intel will run in its
default hardware power-on state (performance), which assumes that users
care for performance at all costs and not for energy efficiency.
While that is fine for performance benchmarks, the hardware's intended default
operating point is "normal" mode...

Initialize the MSR to the "normal" by default during kernel boot.

x86_energy_perf_policy(8) is available to change the default after boot,
should the user have a different preference.

cc: stable <at> kernel.org
Signed-off-by: Len Brown <len.brown <at> intel.com>
---
 arch/x86/include/asm/msr-index.h |    3 +++
 arch/x86/kernel/cpu/intel.c      |   14 ++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index 43a18c7..91fedd9 100644
(Continue reading)

Dave Jones | 1 Apr 2011 08:21
Picon
Favicon

Re: [PATCH 2.6.39 & -stable] x86 intel power: Initialize MSR_IA32_ENERGY_PERF_BIAS

On Fri, Apr 01, 2011 at 01:59:01AM -0400, Len Brown wrote:

 > +#define ENERGY_PERF_BIAS_POWERSWAVE	15

Typo I assume.

	Dave

Ingo Molnar | 1 Apr 2011 08:39
Picon
Picon
Favicon

Re: [PATCH 2.6.39 & -stable] x86 intel power: Initialize MSR_IA32_ENERGY_PERF_BIAS


* Len Brown <lenb <at> kernel.org> wrote:

> From: Len Brown <len.brown <at> intel.com>
> 
> Since 2.6.36 (23016bf0d25), Linux prints the existence of "epb" in /proc/cpuinfo,
> Since 2.6.38 (d5532ee7b40), the x86_energy_perf_policy(8) utility has
> been available in-tree to update MSR_IA32_ENERGY_PERF_BIAS.
> 
> However, the typical BIOS fails to initialize the MSR, presumably
> because this is handled by high-volume shrink-wrap operating systems...
> 
> Linux distros, on the other hand, do not yet invoke x86_energy_perf_policy(8).
> As a result, WSM-EP, SNB, and later hardware from Intel will run in its
> default hardware power-on state (performance), which assumes that users
> care for performance at all costs and not for energy efficiency.
> While that is fine for performance benchmarks, the hardware's intended default
> operating point is "normal" mode...
> 
> Initialize the MSR to the "normal" by default during kernel boot.
> 
> x86_energy_perf_policy(8) is available to change the default after boot,
> should the user have a different preference.
> 
> cc: stable <at> kernel.org
> Signed-off-by: Len Brown <len.brown <at> intel.com>
> ---
>  arch/x86/include/asm/msr-index.h |    3 +++
>  arch/x86/kernel/cpu/intel.c      |   14 ++++++++++++++
>  2 files changed, 17 insertions(+), 0 deletions(-)
(Continue reading)

Jiri Kosina | 1 Apr 2011 11:28
Picon

Re: [PATCH] x86 idle APM: delete apm_cpu_idle(), and its use of pm_idle

On Wed, 30 Mar 2011, Len Brown wrote:

> From: Len Brown <len.brown <at> intel.com>
> 
> There is some doubt whether the APM idle feature
> to call into the BIOS from the idle loop is reliable.
> Certainly it was known to fail on some machines,
> but more importantly, APM machines have not shipped
> for a decade and so finding machines to test the code
> is problematic.
> 
> After this patch, systems running in APM mode will
> simply run default_idle() and HALT without calling
> into the BIOS from their idle loop.
> 
> This deletes a much-maligned modular user of the (pm_idle)()
> function pointer.
> 
> Signed-off-by: Len Brown <len.brown <at> intel.com>
> ---
> Jiri,
> If you can review, test, ack, that would be great.
> I'll probably end up shipping this via the idle tree
> because subsequent patches to delete pm_idle
> will depend on it.

Looks fine, works here.

	Acked-by: Jiri Kosina <jkosina <at> suse.cz>

(Continue reading)

Trinabh Gupta | 1 Apr 2011 11:38
Picon

Re: [PATCH 0/9] x86 idle cruft removal - v2

> 2.6.39-rc1
> ----------
>
> x86 idle: deprecate floppy disable_hlt
> 	feature-removal.txt for 2.6.40 (4 months)
> 	WARN_ONCE on use
> 	cc: stable <at> kernel.org
>
> x86 idle APM: deprecate apm_cpu_idle
> 	feature-removal.txt for 2.6.40 (4 months)
> 	#warning on CONFIG_APM_CPU_IDLE remove in 2.6.40
> 	WARN_ONCE in apm_cpu_idle()
> 	cc: stable <at> kernel.org
>
> x86 idle: export pm_idle only for CONFIG_APM_MODULE
> 	like we do for default_idle(),
> 	EXPORT_SYMBOL(pm_idle) only on CONFIG_APM_MODULE
>
> x86 idle: deprecate "no-hlt" cmdline param
> 	feature-removal.txt for 2.6.40 (4 months)
> 	cc stable <at> kernel.org
> 	WARN_ONCE if used, ask if idle=poll is sufficient
> 	same as idle=poll, except no-hlt also disables
> 		HLT in machine_halt().
>
> x86 idle: deprecate "idle=mwait"
> 	feature-removal.txt for 2.6.40 (4 months)
> 	cc stable <at> kernel.org
> 	WARN_ONCE on invocation
>
(Continue reading)

Andreas Herrmann | 1 Apr 2011 13:02
Picon
Favicon

Re: [PATCH 9/9] x86 idle: delete mwait_idle()

On Thu, Mar 31, 2011 at 02:03:24AM -0400, Len Brown wrote:
> From: Len Brown <len.brown <at> intel.com>
> 
> For ACPI mode, mwait_with_hints() in cstate.c is used instead of
> process.c's mwait_idle().
> 
> For INTEL_IDLE mode, the mwait in intel_idle() is used instead of
> process.c's mwait_idle().
> 
> So delete process.c's mwait_idle().
> This will change the behaviour of SMP sysgtems that are
> running !ACPI and !INTEL_IDLE kernels -- they will use
> HALT instead of MWAIT.
> 
> This deletes the "idle=mwait" parameter, and thus the
> boot_option_idle_override == IDLE_FORCE_MWAIT flag.
> 
> Signed-off-by: Len Brown <len.brown <at> intel.com>

Acked-by: Andreas Herrmann <andreas.herrmann3 <at> amd.com>

Regards,
Andreas

Len Brown | 1 Apr 2011 20:33

Re: [PATCH 0/9] x86 idle cruft removal - v2


> I guess this would eliminate the problems caused by pm_idle.

Right.

...at least we can contain it inside process.c
where we still need to be able to handle halt/amd-bug/poll.
Probably I'll re-name it to better reflect its function,
say x86_default_idle, in this case.

> In that case I also think we need not implement a default
> driver (like the one I had done https://lkml.org/lkml/2011/3/22/154)
> to handle the case when acpi_idle and intel_idle may not register.

Right.

the stuff in process.c should handle the !cpuidle
and !CPU_IDLE cases, and in the typical case it will
handle idle during boot before cpuidle initializes.

> Additionally, we may not need to support multiple cpuidle driver registration
> as now there would be only acpi_idle and intel_idle
> and mechanism already exists to select between the two.

Right.

I think multiple driver registration is over-kill, though
I have no real opposition to it should a real need for it emerge.
The only need I could come up with is that it would save me
a reboot when I want to compare drivers -- but we should optimize
(Continue reading)

Len Brown | 2 Apr 2011 02:07

Re: [PATCH] cpuidle: menu: fixed wrapping timers at 4.294 seconds

applied to idle-test

thanks,
Len Brown, Intel Open Source Technology Center

ps. please cc linux-pm on cpuidle pathces

On Thu, 24 Feb 2011, Tero Kristo wrote:

> Cpuidle menu governor is using u32 as a temporary datatype for storing
> nanosecond values which wrap around at 4.294 seconds. This causes errors
> in predicted sleep times resulting in higher than should be C state
> selection and increased power consumption. This also breaks cpuidle
> state residency statistics.
> 
> Signed-off-by: Tero Kristo <tero.kristo <at> nokia.com>
> ---
>  drivers/cpuidle/governors/menu.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
> index f508690..c47f3d0 100644
> --- a/drivers/cpuidle/governors/menu.c
> +++ b/drivers/cpuidle/governors/menu.c
>  <at>  <at>  -237,6 +237,7  <at>  <at>  static int menu_select(struct cpuidle_device *dev)
>  	unsigned int power_usage = -1;
>  	int i;
>  	int multiplier;
> +	struct timespec t;
>  
(Continue reading)

Len Brown | 2 Apr 2011 08:22

[PATCH 02/18] x86 idle floppy: deprecate disable_hlt()

From: Len Brown <len.brown <at> intel.com>

Plan to remove floppy_disable_hlt in 2.6.40, an ancient
workaround with comments that it should be removed.

This allows us to remove clutter and a run-time branch
from the idle code.

WARN_ONCE() on invocation until it is removed.

cc: x86 <at> kernel.org
cc: stable <at> kernel.org
Signed-off-by: Len Brown <len.brown <at> intel.com>
---
 Documentation/feature-removal-schedule.txt |    8 ++++++++
 drivers/block/floppy.c                     |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index b3f35e5..54db467 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
 <at>  <at>  -6,6 +6,14  <at>  <at>  be removed from this file.

 ---------------------------

+What:	x86 floppy disable_hlt
+When:	2.6.40
+Why:	ancient workaround of dubious utility clutters the
+	code used by everybody else.
(Continue reading)


Gmane