Xen performance issue: backport acpi-cpufreq.v4 branch to 3.2 kernel for Precise

Bug #898112 reported by Mike McClurg on 2011-11-30
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned
Precise
Undecided
Unassigned
Quantal
Medium
Unassigned

Bug Description

The 3.0 Linux kernel used in Ubuntu 11.04 and 11.10 is lacking a rather key set of patches in which inform the Xen hypervisor about the power management (specifically cpufreq scaling) properties of the processors in the system. Without these patches, Xen will not make use of the highest performing CPU frequencies. These patches are in the process of being upstreamed to Linux mainline at version 3.3, but are already readily available and reasonably easy to apply to a 3.0 onwards kernel. You can find them at:

git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git devel/acpi-cpufreq.v4

Because of the rather large performance penalty without these patches, I propose that this backport be included in the Ubuntu 3.2 kernel for Precise. Since this patch series can be applied to 3.0, it would be nice to include this in the 3.0 kernel for Oneiric as well.

Please see the following blog post for a more detailed description of the issue:

http://blog.xen.org/index.php/2011/11/29/baremetal-vs-xen-vs-kvm-redux/

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 898112

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: precise
Mike McClurg (mike-mcclurg) wrote :

No apport available.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

If you want this bot to quit automatically requesting kernel tests, add a tag named: bot-stop-nagging.

 Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.2.0-2.5
Mike McClurg (mike-mcclurg) wrote :

I've checked the ubuntu-precise tree and I don't think that this branch has been merged yet:

http://kernel.ubuntu.com/git?p=ubuntu%2Fubuntu-precise.git&a=search&h=HEAD&st=commit&s=acpi-cpufreq

I'm going to move this to Confirmed and set the bot-stop-nagging tag.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: bot-stop-nagging
Joseph Salisbury (jsalisbury) wrote :

Mike,

Is there any work being done to try and get these patches upstreamed to Linux mainline at version 3.2? That would make the inclusion of the patches in Precise automatic.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
tags: added: kernel-da-key
Mike McClurg (mike-mcclurg) wrote :

Hi Joseph,

Konrad has just submitted an RFC to LKML to discuss mainlining this. Please see:

https://lkml.org/lkml/2011/11/30/245

Joseph Salisbury (jsalisbury) wrote :

@Mike

Do you know if these patches have been accepted upstream as of yet?

Joseph Salisbury (jsalisbury) wrote :

Thanks for the update, Konrad.

Joseph Salisbury (jsalisbury) wrote :

Any chance these will be submitted to linux-stable?

Stefan Bader (smb) wrote :

I would be a bit reluctant to include this. It now getting in for 3.4, and I agree with Konrad that Greg would be beating anybody with a big stick who tries to submit this as a stable update. And we are past feature freeze as well. And quite close to release.
At most I would think of it to be added after release when there is again some time to get it tested. But then there must be a very good argument for the benefits. :/

Stefan Bader (smb) wrote :

Looking over the patches, the infrastructural changes are quite limited. So the biggest hunk of change is the new driver. At least that helps in the argument in the sense that only Xen hosts/guests are affected. Still there are some things I think should be checked.
The new driver gets loaded in dom0 and pushes things into the hypervisor. What Xen version does this require for the hypervisor?
From the top of my head I am not sure whether there is a requirement/dependency for domU as well. But I think those probably get different acpi tables coming from xen. But at least it should be verified to boot older and newer guests.

Tim Gardner (timg-tpi) on 2012-05-16
Changed in linux (Ubuntu Precise):
status: New → Fix Committed
Changed in linux (Ubuntu Quantal):
status: Triaged → Fix Released
Tim Gardner (timg-tpi) wrote :

SRU Justification

Impact: Xen instances do not run at full speed, nor do they implement C states.

Patch description: Backport and cherrypick a series from upstream

xen/apic: Return the APIC ID (and version) for CPU 0.
xen/cpufreq: Disable the cpu frequency scaling drivers from loading.
xen/acpi: Remove the WARN's as they just create noise.
xen/acpi: Fix Kconfig dependency on CPU_FREQ
xen/acpi-processor: Do not depend on CPU frequency scaling drivers.
xen/acpi-processor: C and P-state driver that uploads said data to hyperv
provide disable_cpufreq() function to disable the API.
UBUNTU: [Config] CONFIG_XEN_ACPI_PROCESSOR=y

See discussion at https://lists.ubuntu.com/archives/kernel-team/2012-May/020267.html

Luis Henriques (henrix) wrote :

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

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!

tags: added: verification-needed-precise
Tim Gardner (timg-tpi) wrote :

Stefan - please verify that the Xen instance does not exhibit any regressions.

Changed in linux (Ubuntu Precise):
assignee: nobody → Stefan Bader (stefan-bader-canonical)
Stefan Bader (smb) wrote :

Confirming that running 3.2.0-25-generic #40 on my AMD based host does start to use p-states from the hypervisor. xenpm is showing information and power usage drops. Brought up one PVM and HVM guest to verify those are still basically working and have the same kernel installed on my desktop without visible regressions.

tags: added: verification-done-precise
removed: verification-needed-precise
Launchpad Janitor (janitor) wrote :
Download full text (21.0 KiB)

This bug was fixed in the package linux - 3.2.0-25.40

---------------
linux (3.2.0-25.40) precise-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1003534

  [ Andy Whitcroft ]

  * [Config] control.stub is an intermediate product not a dependancy
    - LP: #992414
  * [Config] include include/generated/compile.h
    - LP: #942569

  [ Dave Martin ]

  * SAUCE: rtc: pl031: Enable module alias autogeneration for AMBA drivers
    - LP: #1000831

  [ Herton Ronaldo Krzesinski ]

  * Revert "SAUCE: ite-cir: postpone ISR registration"
    - LP: #1002484
  * SAUCE: async_populate_rootfs: fix build warnings
    - LP: #1003417

  [ Ike Panhc ]

  * [Config] add highbank flavour
    - LP: #1000831

  [ John Johansen ]

  * SAUCE: apparmor: fix long path failure due to disconnected path
    - LP: #955892
  * SAUCE: apparmor: fix profile lookup for unconfined
    - LP: #978038, #987371

  [ Mark Langsdorf ]

  * SAUCE: arm highbank: add support for pl320-ipc driver
    - LP: #1000831

  [ Rob Herring ]

  * SAUCE: input: add a key driver for highbank
    - LP: #1000831
  * SAUCE: ARM: highbank: Add smc calls to enable/disable the L2
    - LP: #1000831
  * SAUCE: force DMA buffers to non-bufferable on highbank
    - LP: #1000831
  * SAUCE: net: calxedaxgmac: fix net timeout recovery
    - LP: #1000831

  [ Tim Gardner ]

  * [Config] perarch and indep tools builds need separate build directories
  * [Config] CONFIG_XEN_ACPI_PROCESSOR=y
    - LP: #898112

  [ Upstream Kernel Changes ]

  * Revert "autofs: work around unhappy compat problem on x86-64"
    - LP: #1002482
  * Input: wacom - cleanup feature report for bamboos
    - LP: #568064
  * Input: wacom - remove unused bamboo HID parsing
    - LP: #568064
  * Input: wacom - add some comments to wacom_parse_hid
    - LP: #568064
  * Input: wacom - relax Bamboo stylus ID check
    - LP: #568064
  * Input: wacom - read 3rd gen Bamboo Touch HID data
    - LP: #568064
  * Input: wacom - 3rd gen Bamboo P&Touch packet support
    - LP: #568064
  * Input: wacom - ignore unwanted bamboo packets
    - LP: #568064
  * HID: wacom: Move parsing to a separate function
    - LP: #568064
  * HID: wacom: Initial driver for Wacom Intuos4 Wireless (Bluetooth)
    - LP: #568064
  * Input: wacom - add support for Cintiq 24HD
    - LP: #568064
  * Input: wacom - add LED support for Cintiq 24HD
    - LP: #568064
  * Input: wacom - add missing LEDS_CLASS to Kconfig
    - LP: #568064
  * Input: wacom - fix 3rd-gen Bamboo MT when 4+ fingers are in use
    - LP: #568064
  * power_supply: allow a power supply to explicitly point to powered
    device
    - LP: #568064
  * power_supply: add "powers" links to self-powered HID devices
    - LP: #568064
  * HID: wiimote: fix invalid power_supply_powers call
    - LP: #568064
  * HID: wacom: Fix invalid power_supply_powers calls
    - LP: #568064
  * ARM: 7178/1: fault.c: Port OOM changes into do_page_fault
    - LP: #951043
  * ARM: 7368/1: fault.c: correct how the tsk->[maj|min]_flt gets
    incremented
    - LP: #951043
  * hugepages: fix use after free bug in "quota" handling
    - LP: #990368
    - CVE-2012-2133
  * provide disable_cpufreq() functio...

Changed in linux (Ubuntu Precise):
status: Fix Committed → Fix Released
Stefan Bader (smb) on 2012-10-23
Changed in linux (Ubuntu Precise):
assignee: Stefan Bader (stefan-bader-canonical) → nobody

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers