Update intel_idle driver

Bug #684888 reported by Leann Ogasawara
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned
Maverick
Fix Released
Medium
Leann Ogasawara

Bug Description

SRU Justification:

We periodically provide updated drivers to provide additional support for hardware and provide bug fixes. The intel_idle is a cpuidle driver that loads on specific Intel processors in lieu of the legacy ACPI processor_idle driver. The intent is to make Linux more efficient on these processors, as intel_idle knows more than ACPI, as well as make Linux more immune to ACPI BIOS bugs. As we now support HW that can leverage the intel_idle driver, it's advantageous to provide an updated version of the driver for those interested in it's use. All of the patches are already upstream as well (see details below).

I'd originally pursued providing this update via linux-bcakports-modules. However, testing proved that because the acpi_idle driver is built into the kernel, it prevents the intel_idle driver from loading later on via LBM. This is because the core cpuidle driver is not capable of handling run-time changing of idle drivers.

I would also like to note that these patches were originally submitted to upstream stable by the upstream maintainer. However, the submission
was later retracted due to the fact that some of the patches are cosmetic in nature. See:

git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6.35.y.git idle-release

Impact:

These patches should only affect the intel_idle driver. It will also only load on supported systems. This driver can also be disabled by booting with "intel_idle.max_cstate=0" which disables intel_idle and the system will fall back on ACPI's "acpi_idle".

I will also update https://wiki.ubuntu.com/Kernel/Dev/KernelDriverDeviations to note the update.

Test Case:

Load the kernel with the updated intel_idle driver on a system which is supported and confirm it loads/functions.

A summary of the usptream patches is as follows:

 * intel_idle: do not use the LAPIC timer for ATOM C2
 * intel_idle: add initial Sandy Bridge support
 * intel_idle: delete bogus data from cpuidle_state.power_usage
 * intel_idle: simplify test for leave_mm()
 * intel_idle: enable Atom C6
 * intel_idle: Voluntary leave_mm before entering deeper
 * cpuidle: extend cpuidle and menu governor to handle dynamic states
 * intel_idle: add missing __percpu markup
 * intel_idle: Change mode 755 => 644
 * x86, mwait: Move mwait constants to a common header file
 * intel_idle: recognize Lincroft Atom Processor
 * intel_idle: add support for Westmere-EX
 * intel_idle: delete power_policy modparam, and choose substate functions
 * intel_idle: delete substates DEBUG modparam

CVE References

Changed in linux (Ubuntu):
status: New → Invalid
Changed in linux (Ubuntu Maverick):
assignee: nobody → Leann Ogasawara (leannogasawara)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Just tested the patches on an Intel Sandy Bridge. I can confirm that a kernel without the patches doesn't support running the intel_idle driver on Sandy Bridge (as expected). After booting into a kernel with the patches, intel_idle is loaded and runs.

$ uname -a
Linux sugarbay 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 11:55:36 UTC 2010 x86_64 GNU/Linux

$ dmesg | grep "intel_idle"
[ 1.672968] intel_idle: MWAIT substates: 0x1120
[ 1.672970] intel_idle: does not run on family 6 model 42

$ uname -a
Linux sugarbay 2.6.35-24-generic #42+lp684888 SMP Fri Dec 3 19:11:30 UTC 2010 x86_64 GNU/Linux

$ dmesg | grep "intel_idle"
[ 1.662006] intel_idle: MWAIT substates: 0x1120
[ 1.662008] intel_idle: v0.4 model 0x2A
[ 1.662010] intel_idle: lapic_timer_reliable_states 0xffffffff
[ 1.663670] ACPI: acpi_idle yielding to intel_idle

description: updated
Revision history for this message
dino99 (9d9) wrote :

Hope you can update some cpu family like mine:

using a "family 6 model 23" aka q9550 on an updated Natty i386 running 2.6.37-7-generic-pae

oem@oem-desktop:~$ dmesg | grep "intel_idle"
[ 0.487996] intel_idle: MWAIT substates: 0x20
[ 0.487998] intel_idle: does not run on family 6 model 23

About this cpu, Intel says that it support "Idle States" into "Advanced Technologies"
http://ark.intel.com/Product.aspx?id=33924

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Maverick):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Steve Conklin (sconklin) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed' to 'verification-done'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

Revision history for this message
Benn (benn-blessing) wrote :

Just tested on lenovo s10-3 with atom N475. Previously had to disable intel_idle to boot.

$ dmesg | grep "intel_idle"
[ 0.604340] intel_idle: MWAIT substates: 0x20220
[ 0.604348] intel_idle: v0.4 model 0x1C
[ 0.604353] intel_idle: lapic_timer_reliable_states 0x6
[ 0.802307] ACPI: acpi_idle yielding to intel_idle

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Benn (benn-blessing) wrote :

On further testing, intel_idle seems to break my resume function. When I disabled it, suspend works fine.
Attached is output of /var/log/kern.log | grep PM. First with intel_idle, then without.

20:42:48 S10-3 kernel: [ 1.157188] PM: Resume from disk failed.

Benn (benn-blessing)
tags: added: verification-needed
removed: verification-done
Revision history for this message
Brad Figg (brad-figg) wrote :

This patch was applied to Maverick as part of an upstream stable update, therefore it doesn't require individual verification.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Sorry for the noise. I thought comment 6 was a regression, but it seems it didn't work before either.

tags: added: regression-proposed verification-failed
removed: verification-done
tags: added: verification-done
removed: regression-proposed verification-failed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (24.4 KiB)

This bug was fixed in the package linux - 2.6.35-25.44

---------------
linux (2.6.35-25.44) maverick-proposed; urgency=low

  [ Upstream Kernel Changes ]

  * Revert "drm/radeon/kms: properly compute group_size on 6xx/7xx"
    - LP: #703553

linux (2.6.35-25.43) maverick-proposed; urgency=low

  [ Brad Figg ]

  - LP: #697948

  [ Andy Whitcroft ]

  * [Config] add vmware-balloon driver to -virtual flavour
    - LP: #592039

  [ Manoj Iyer ]

  * SAUCE: Enable jack sense for Thinkpad Edge 13
    - LP: #685015

  [ Robert Hooker ]

  * Revert "(pre-stable): input: Support Clickpad devices in ClickZone
    mode"
    - LP: #669399

  [ Stefan Bader ]

  * Set virtual flavour maximum of domain visible memory to 70G
    - LP: #667796

  [ Takashi Iwai ]

  * SAUCE: input: Support Clickpad devices in ClickZone mode
    - LP: #516329

  [ Tim Gardner ]

  * [Config] Add nfsd modules to -virtual flavour
    - LP: #688070
  * [Config] Added autofs4.ko to -virtual flavour
    - LP: #692917

  [ Upstream Kernel Changes ]

  * intel_idle: delete substates DEBUG modparam
    - LP: #684888
  * intel_idle: delete power_policy modparam, and choose substate functions
    - LP: #684888
  * intel_idle: add support for Westmere-EX
    - LP: #684888
  * intel_idle: recognize Lincroft Atom Processor
    - LP: #684888
  * x86, mwait: Move mwait constants to a common header file
    - LP: #684888
  * intel_idle: Change mode 755 => 644
    - LP: #684888
  * intel_idle: add missing __percpu markup
    - LP: #684888
  * cpuidle: extend cpuidle and menu governor to handle dynamic states
    - LP: #684888
  * intel_idle: Voluntary leave_mm before entering deeper
    - LP: #684888
  * intel_idle: enable Atom C6
    - LP: #684888
  * intel_idle: simplify test for leave_mm()
    - LP: #684888
  * intel_idle: delete bogus data from cpuidle_state.power_usage
    - LP: #684888
  * intel_idle: add initial Sandy Bridge support
    - LP: #684888
  * intel_idle: do not use the LAPIC timer for ATOM C2
    - LP: #684888
  * staging: usbip: Notify usb core of port status changes
    - LP: #686158
  * staging: usbip: Process event flags without delay
    - LP: #686158
  * Staging: phison: fix problem caused by libata change
    - LP: #686158
  * perf_events: Fix bogus AMD64 generic TLB events
    - LP: #686158
  * perf_events: Fix bogus context time tracking
    - LP: #686158
  * powerpc/perf: Fix sampling enable for PPC970
    - LP: #686158
  * pcmcia: synclink_cs: fix information leak to userland
    - LP: #686158
  * sched: Drop all load weight manipulation for RT tasks
    - LP: #686158
  * sched: Fix string comparison in /proc/sched_features
    - LP: #686158
  * bluetooth: Fix missing NULL check
    - LP: #686158
  * futex: Fix errors in nested key ref-counting
    - LP: #686158
  * cifs: fix broken oplock handling
    - LP: #686158
  * libahci: fix result_tf handling after an ATA PIO data-in command
    - LP: #686158
  * mm, x86: Saving vmcore with non-lazy freeing of vmas
    - LP: #686158
  * x86, cpu: Fix renamed, not-yet-shipping AMD CPUID feature bit
    - LP: #686158
  * x86, kexec: Make sure to stop all CPUs before exiting the kernel
    - LP: #686158
  * x86, olpc: Don...

Changed in linux (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
dino99 (9d9) wrote :

this issue is not fixed on natty:

oem@oem-desktop:~$ dmesg | grep "intel_idle"
[ 0.480726] intel_idle: MWAIT substates: 0x20
[ 0.480728] intel_idle: does not run on family 6 model 23
oem@oem-desktop:~$ uname -a
Linux oem-desktop 2.6.38-1-generic-pae #28-Ubuntu SMP Fri Jan 28 16:56:46 UTC 2011 i686 i686 i386 GNU/Linux

Changed in linux (Ubuntu):
status: Invalid → New
Revision history for this message
dino99 (9d9) wrote :

might consider lucid too

tags: added: kj-triage
Revision history for this message
dino99 (9d9) wrote :

oem@oem-desktop:~$ dmesg | grep "intel_idle"
[ 0.480823] intel_idle: MWAIT substates: 0x20
[ 0.480825] intel_idle: does not run on family 6 model 23
oem@oem-desktop:~$ uname -a
Linux oem-desktop 2.6.38-5-generic-pae #32-Ubuntu SMP Tue Feb 22 17:48:56 UTC 2011 i686 i686 i386 GNU/Linux

Revision history for this message
Julian Wiedmann (jwiedmann) wrote :

Sorry, your issue is unrelated - this update wasn't supposed to add support for model 23.
(and FYI: considering that your CPU is a pre-Nehalem model, intel_idle will probably never support it)

Changed in linux (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.