CPUidle driver changes needed for SMP ARM platforms

Registered by Michael Turquette on 2011-05-06

Collect common set of requirements needed by SMP ARM platforms for properly handling CPU low power transitions using only the CPUidle path. Purpose is to replace the various hotplug solutions floating around. End product is successful CPUidle driver adaptations for ARM platforms allowing all low power states to be hit without ruining CPU affinity or impacting the scheduler.

Blueprint information

Status:
Complete
Approver:
Vincent Guittot
Priority:
Medium
Drafter:
Michael Turquette
Direction:
Approved
Assignee:
Michael Turquette
Definition:
Superseded
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 2012.10
Started by
Mounir Bsaibes on 2011-09-19
Completed by
Amit Kucheria on 2012-11-29

Related branches

Sprints

Whiteboard

[mturquette 2011/05/06]
Tegra implements this in an interesting way with some interrupt mechanism to signal between CPUs in the CPUidle driver:
http://android.git.kernel.org/?p=kernel/tegra.git;a=blob;f=arch/arm/mach-tegra/cpuidle.c;h=a063c34ecf60aa142df1652ecb6b274794fe528e;hb=refs/heads/android-tegra-2.6.36-honeycomb

As an example of driver that needs adapting, the OMAP4 CPUidle driver in the Android tree expects CPU1 to be taken offline via hotplug framework before CPU0 takes the whole ARM cluster down to a lower C-state:
http://git.omapzoom.org/?p=kernel/omap.git;a=blob;f=arch/arm/mach-omap2/cpuidle44xx.c;h=5e3071d492f21d371afc99130d9133fd1e007ee1;hb=refs/heads/p-android-omap-2.6.35#l78

Main discussion that needs to take place @ UDS is:

1) do we like the approach Tegra takes for other ARM platforms?
2) is it relevant/possible to other ARM platforms?
3) what consolidation can take place here?
4) division of labor to implement platform-specific bits

---

Discussion from LDS revealed:

1) Other platforms have a similar solution to Tegra and don't *require* Hotplug for CPUidle functionality.
    a) OMAP implementation needs to be updated to remove hotplug dependency
    b) What other platforms need updating?
    c) Should wait on Lorenzo's idle consolidation patches?
2) Hotplug is still desirable from the power optimization perspective

[1-13-2012] based on note from Mike Turqueete the SMP CPUidle patches that were developed for OMAP by the Android folks have been posted to the Linux OMAP mailing list. See, http://thread.gmane.org/gmane.linux.ports.tegra/2649/focus=68788

So that action is unblocked now. What remains is to determine if the
other platforms can also implement an SMP CPUidle. Maybe the platform
owners can be assigned this task?

[amitk, 29/11/2012] SMP cpuidle has progressed a great deal now though included support for coupled C-states from android. This blueprint is superseded by new work.

(?)

Work Items

Work items:
[mturquette] determine which ARM platforms need updating: DONE
[mturquette] only OMAP requires hotplug in idle path. Follow up with internal teams on removing hotplug dependency: DONE
determine if the other platforms can also implement an SMP CPUidle: TODO

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.