Feature: cpuidle: Enable fastsleep and winkle in ubuntu 14.04.02 kernel

Bug #1400411 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned
Utopic
Fix Released
Medium
Chris J Arges

Bug Description

SRU Justification:

[Impact]
Users would like to be able to use fastsleep and winkle cpuidle states in the 3.16 Ubuntu kernel when using powernv.

[Fix]
commits
d6a4f70909d279004a2b3d539e240e07b1ecc1cb
56548fc0e86cb9156af7a7e1f15ba78f251dafaf
8117ac6a6c2fa0f847ff6a21a1f32c8d2c8501d0
8eb8ac89a364305d05ad16be983b7890eb462cc3 *backported*
7cba160ad789a3ad7e68b92bf20eaad6ed171f80 *backported*
77b54e9f213f76a23736940cf94bcd765fc00f40
upstream

[Test Case]
Testing fastsleep
-----------------
With these patches cpuidle framework picks up fastsleep as one of the idle states. You can observe the cpus entering fastsleep by checking
/sys/devices/system/cpu/cpuXX/cpuidle/state2/name. This should show FastSleep.
Then while system is idle check /sys/devices/system/cpu/cpuXX/cpuidle/state2/time increment over time
This shows the amount of time a particular cpu was in fastsleep.

Testing Winkle
--------------
With these patches, offline cpus enter winkle. So test this by offlining and onlining cpus.
ppc64_cpu --cores-on=1
ppc64_cpu --cores-on=X where X is the total number of cores available in the machine.

--

This is a feature request to enable power management features fastsleep and winkle cpuidle states in ubuntu -14.04.02 kernel. The cpuidle state management patches have been posted to Linux Kernel Community.

Mailing list:
[PATCH 0/4] powernv: cpuidle: Redesign idle states management
https://lists.ozlabs.org/pipermail/linuxppc-dev/2014-November/122433.html

Patchset:
[1/4] powerpc: powernv: Switch off MMU before entering nap/sleep/rvwinkle mode
https://patchwork.ozlabs.org/patch/406249/

[2/4] powerpc/powernv: Enable Offline CPUs to enter deep idle states
https://patchwork.ozlabs.org/patch/406250/

[3/4] powernv: cpuidle: Redesign idle states management
https://patchwork.ozlabs.org/patch/406256/

[4/4] powernv: powerpc: Add winkle support for offline cpus
https://patchwork.ozlabs.org/patch/406251/

CVE References

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-119510 severity-medium targetmilestone-inin140402
Luciano Chavez (lnx1138)
affects: ubuntu → linux (Ubuntu)
tags: added: kernel-da-key
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2014-12-16 08:25 EDT-------
(In reply to comment #3)
> Shilpasri,
>
> I would like to ask you to update this bug as soon as the patches get
> accepted, with the commit-ids also.

Hi,
These patches have been accepted and are now in the linux-next tree. Commit ids are as follows-
56548fc0e86cb9156af7a7e1f15ba78f251dafaf powerpc/powernv: Return to cpu offline loop when finished in KVM guest
8117ac6a6c2fa0f847ff6a21a1f32c8d2c8501d0 powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode
8ac89a364305d05ad16be983b7890eb462cc3 powerpc/powernv: Enable Offline CPUs to enter deep idle states
7cba160ad789a3ad7e68b92bf20eaad6ed171f80 powernv/cpuidle: Redesign idle states management
8eb
77b54e9f213f76a23736940cf94bcd765fc00f40 powernv/powerpc: Add winkle support for offline cpus

Revision history for this message
Chris J Arges (arges) wrote :

All commits are present in 3.19-rc1

Changed in linux (Ubuntu Utopic):
assignee: nobody → Chris J Arges (arges)
importance: Undecided → Medium
status: New → In Progress
Chris J Arges (arges)
description: updated
Revision history for this message
Chris J Arges (arges) wrote :

This will require a bit more thought since it isn't trivially cherry-pick into 3.16. So far I have the following patchset that still requires some backporting:
d6a4f70909d279004a2b3d539e240e07b1ecc1cb * added *
56548fc0e86cb9156af7a7e1f15ba78f251dafaf
8117ac6a6c2fa0f847ff6a21a1f32c8d2c8501d0
74aa51b5ccd3975392e30d11820dc073c5f2cd32 * added *
8eb8ac89a364305d05ad16be983b7890eb462cc3
6d626c5ea3d8411cc2a72d7cabe70f01dfc32d1d * added (backport) *
7cba160ad789a3ad7e68b92bf20eaad6ed171f80 * backport *
77b54e9f213f76a23736940cf94bcd765fc00f40

Obviously only introducing the required features would be optimal. Feedback on backport strategy would be appreciated.

Revision history for this message
bugproxy (bugproxy) wrote : Backports of the required patches.These are against git://kernel.ubuntu.com/ubuntu/ubuntu-utopic.git

------- Comment (attachment only) From <email address hidden> 2015-01-09 07:21 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2015-01-09 12:25 EDT-------
> Backports of the required patches.These are against
> git://kernel.ubuntu.com/ubuntu/ubuntu-utopic.git

Thank you for working on these patches, I am looking at the patches, and I see something weird. After uncompressing your tar file, it generates a 0001-powerpc-powernv-Don-t-call-generic-code-on-offline-c.patch file, that seems to be a tar file.

Take a look:
$ file 0001-powerpc-powernv-Don-t-call-generic-code-on-offline-c.patch
0001-powerpc-powernv-Don-t-call-generic-code-on-offline-c.patch: POSIX tar archive (GNU)

Revision history for this message
bugproxy (bugproxy) wrote : Backports of the required patches.These are against git://kernel.ubuntu.com/ubuntu/ubuntu-utopic.git

------- Comment (attachment only) From <email address hidden> 2015-01-09 14:28 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2015-01-09 14:31 EDT-------
(In reply to comment #14)
> > Backports of the required patches.These are against
> > git://kernel.ubuntu.com/ubuntu/ubuntu-utopic.git
>
> Thank you for working on these patches, I am looking at the patches, and I
> see something weird. After uncompressing your tar file, it generates a
> 0001-powerpc-powernv-Don-t-call-generic-code-on-offline-c.patch file, that
> seems to be a tar file.
>
> Take a look:
> $ file 0001-powerpc-powernv-Don-t-call-generic-code-on-offline-c.patch
> 0001-powerpc-powernv-Don-t-call-generic-code-on-offline-c.patch: POSIX tar
> archive (GNU)

Hi, sorry about that. I have attached the patches again. They should be fine now.

Revision history for this message
Chris J Arges (arges) wrote :

Thanks! I can see patches 0002 and beyond. 0001 is still an archive, but it's ok since its a clean cherrypick of d6a4f709 anyway. I have enough here to get this submitted as an SRU into the ubuntu-utopic kernel.

description: updated
Revision history for this message
Chris J Arges (arges) wrote :

Sent pull request to kernel team ML.

Revision history for this message
Chris J Arges (arges) wrote :

Patches are here for review:
http://zinc.ubuntu.com/git?p=arges/ubuntu-utopic.git;a=shortlog;h=refs/heads/lp1400411

Is there a test program or some way to ensure these additional cpuidle features are working correctly?

description: updated
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2015-01-10 03:01 EDT-------
Testing fastsleep
-----------------
With these patches cpuidle framework picks up fastsleep as one of the idle states. You can observe the cpus entering fastsleep by checking
/sys/devices/system/cpu/cpuXX/cpuidle/state2/name. This should show FastSleep.
Then while system is idle check /sys/devices/system/cpu/cpuXX/cpuidle/state2/time increment over time
This shows the amount of time a particular cpu was in fastsleep.

Testing Winkle
--------------
With these patches, offline cpus enter winkle. So test this by offlining and onlining cpus.
ppc64_cpu --cores-on=1
ppc64_cpu --cores-on=X where X is the total number of cores available in the machine.

Chris J Arges (arges)
description: updated
Brad Figg (brad-figg)
Changed in linux (Ubuntu Utopic):
status: In Progress → Fix Committed
Chris J Arges (arges)
Changed in linux (Ubuntu):
status: New → Fix Committed
Revision history for this message
Breno Leitão (breno-leitao) wrote :

Hi Chris,

Do you know when this patch will be released in 14.04 kernel?

Thanks

Chris J Arges (arges)
Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Brad Figg (brad-figg) 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-utopic' to 'verification-done-utopic'.

If verification is not done by 5 working days 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-utopic
bugproxy (bugproxy)
tags: removed: verification-needed-utopic
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Adding tag 'verification-done-utopic' as requested in comment 13.
Verification done internally, but the bug mirroring didn't fully did the tags.

tags: added: verification-done-utopic
bugproxy (bugproxy)
tags: removed: verification-done-utopic
Revision history for this message
Chris J Arges (arges) wrote :

Looks like bugproxy really doesn't like that tag. : )

tags: added: verification-done-utopic
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Heheh, indeed.
By the way, I reported that issue here a few days ago.
Hopefully the bug mirroring team will get that fixed.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (28.3 KiB)

This bug was fixed in the package linux - 3.16.0-31.41

---------------
linux (3.16.0-31.41) utopic; urgency=low

  [ Seth Forshee ]

  * Release Tracking Bug
    - LP: #1419961

  [ Andy Whitcroft ]

  * [Debian] arm64 -- build ubuntu drivers
    - LP: #1411284
  * hyper-v -- fix comment handing in /etc/network/interfaces
    - LP: #1413020

  [ Ben Hutchings ]

  * SAUCE: rtsx_usb_ms: Use msleep_interruptible() in polling loop
    - LP: #1413149

  [ Brad Figg ]

  * SAUCE: Config IWLWIFI_UAPSD=N

  [ Kamal Mostafa ]

  * [Packaging] force "dpkg-source -I -i" behavior

  [ Kukjin Kim ]

  * SAUCE: (no-up) ARM: SAMSUNG: fix the CPU_ID for EXYNOS5440
    - LP: #1411062

  [ Leann Ogasawara ]

  * ubuntu: AUFS -- Resolve build failure union has no member named
    'd_child'

  [ Ming Lei ]

  * SAUCE: (no-up) ARM: EXYNOS: fix booting oops on exynos5440
    - LP: #1411062
  * SAUCE: (no-up) ARM: exynos5440-sd5v1: switch to fixed-link DT binding
    - LP: #1417339
  * SAUCE: (no-up) net: stmmac: add fixed_phy support via fixed-link DT
    binding
    - LP: #1417339

  [ Upstream Kernel Changes ]

  * Revert "[SCSI] mpt2sas: Remove phys on topology change."
    - LP: #1419125
  * Revert "[SCSI] mpt3sas: Remove phys on topology change"
    - LP: #1419125
  * Revert "ARM: 7830/1: delay: don't bother reporting bogomips in
    /proc/cpuinfo"
    - LP: #1419125
  * powerpc/powernv: Don't call generic code on offline cpus
    - LP: #1400411
  * powerpc/powernv: Return to cpu offline loop when finished in KVM guest
    - LP: #1400411
  * powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode
    - LP: #1400411
  * powerpc/powernv: Enable Offline CPUs to enter deep idle states
    - LP: #1400411
  * powernv/cpuidle: Redesign idle states management
    - LP: #1400411
  * powernv/powerpc: Add winkle support for offline cpus
    - LP: #1400411
  * powerpc/kdump: Ignore failure in enabling big endian exception during
    crash
    - LP: #1410817
  * powerpc/perf/hv-24x7: Use kmem_cache_free
    - LP: #1410519
  * powerpc/perf/hv-24x7: use kmem_cache instead of aligned stack
    allocations
    - LP: #1410519
  * powerpc/perf/hv-24x7: Use per-cpu page buffer
    - LP: #1410519
  * power/perf/hv-24x7: Use kmem_cache_free() instead of kfree
    - LP: #1410519
  * KVM: x86: SYSENTER emulation is broken
    - LP: #1414651
    - CVE-2015-0239
  * powerpc/xmon: Fix another endiannes issue in RTAS call from xmon
    - LP: #1415919
  * HID: i2c-hid: call the hid driver's suspend and resume callbacks
    - LP: #1417363
  * HID: i2c-hid: Do not free buffers in i2c_hid_stop()
    - LP: #1417363
  * ALSA: hda - add mic mute led hook for dell machines
    - LP: #1418832
  * ALSA: hda - move DELL_WMI_MIC_MUTE_LED to the tail in the quirk chain
    - LP: #1381856, #1418832
  * ALSA: hda - fix the mic mute led problem for Latitude E5550
    - LP: #1381856, #1418832
  * drm/i915: don't warn if backlight unexpectedly enabled
    - LP: #1419125
  * drm/i915/dp: only use training pattern 3 on platforms that support it
    - LP: #1419125
  * udptunnel: Add SKB_GSO_UDP_TUNNEL during gro_complete.
    - LP: #1419125
  * s390/3215: fix hanging console issue
    - LP...

Changed in linux (Ubuntu Utopic):
status: Fix Committed → Fix Released
bugproxy (bugproxy)
tags: removed: verification-done-utopic
bugproxy (bugproxy)
tags: added: verification-done-utopic
Revision history for this message
Chris J Arges (arges) wrote :

All patches are in v3.19-rc1 and thus in Vivid.

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Breno Leitão (breno-leitao) wrote : Re: [Bug 1400411] Re: Feature: cpuidle: Enable fastsleep and winkle in ubuntu 14.04.02 kernel

Thanks Chris!

On Thu, Apr 2, 2015 at 10:06 AM, Chris J Arges <email address hidden>
wrote:

> All patches are in v3.19-rc1 and thus in Vivid.
>
> ** Changed in: linux (Ubuntu)
> Status: Fix Committed => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1400411
>
> Title:
> Feature: cpuidle: Enable fastsleep and winkle in ubuntu 14.04.02
> kernel
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1400411/+subscriptions
>

bugproxy (bugproxy)
tags: added: targetmilestone-inin14043
removed: targetmilestone-inin140402
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.