cpuidle: multiple drivers support
Cpu specific cpuidle states are needed to support proper cpuidle operation in heterogeneous processor systems.
For instance, big processors might have different C-states with different latencies compared to the LITTLE processors. Make sure we keep this in mind while improving cpuidle.
Blueprint information
- Status:
- Complete
- Approver:
- Amit Kucheria
- Priority:
- Essential
- Drafter:
- Rob
- Direction:
- Approved
- Assignee:
- Daniel Lezcano
- Definition:
- Approved
- Series goal:
- Accepted for trunk
- Implementation:
- Implemented
- Milestone target:
- 2013.04
- Started by
- Daniel Lezcano
- Completed by
- Daniel Lezcano
Related branches
Related bugs
Sprints
Whiteboard
In order to make separate cpu latencies, we should move out of cpuidle_state the different fields which are not numerical values. That has the benefit of 1. separating the latencies from the cpuidle_driver and use a register_latencies per cpu function 2. allowing to use a default latency value or register a new one from the device tree.
[dzin, 2012-08-22] Should be done for 12.09 cycle. Re-target from 12.08
[dzin, 2012-09-12] Move [daniel-lezcano] : modify all the driver to implement their 'enter' callbacks from .06 to .09
[daniel-lezcano, 2012-09-24] per cpu states not accepted. Suggested to modify multiple drivers support : http://
[daniel-lezcano, 2012-09-26] I rewrote the refcounting part based on get/put approach as the other drivers. It is blocked until the multiple drivers support is not upstream. The current code is bogus even if we don't fall into the bug because of how is written the code using the cpuidle api, especially because the drivers are statically defined. The cpuidle driver life cycle is not correctly handled and it is possible to have a reference to a pointer while this one could be freed or the driver swapped to another one. I don't feel confident that couldn't happen if we play with multiple drivers and we switch the drivers at runtime.
[daniel-lezcano, 2012-10-01] with a single kernel image for ARM and the support of multiple drivers support, it is important to prevent the user to load the wrong driver.
Adding a probe hook in the cpuidle driver structure will prevent this.
[dzin, 2012-10-03] Move to 12.10 to align with work item
[daniel-lezcano, 2012-10-05] code reviewed and tested by Peter De Schrijver on Tegra3 and by Lorenzo Pieralisi on Vexpress TC2.
[daniel-lezcano, 2012-10-08] code reviewed by Rafael Wysocki. Fine with the patchset except some coding style and the sysfs output. Need to respin the patchset and take into account the feedbacks.
[daniel-lezcano, 2012-10-11] patchset respinned to V2 and tested. Needs a cleanup on sysfs before. This cleanup has been send upstream, waiting for it to be merged before sending the multiple driver support.
[daniel-lezcano, 2012-11-02] multiple drivers support upstream, at this point support for multiple latencies is possible. The rest of the patches are to make the code cleaner and safer.
[daniel-lezcano, 2013-01-03] added some work items even if the bp is finished. These work items are for some misc enhancement and bug fixes.
[ototo, 2013-02-01] Moving newly added unfinished items to 2013.02. Perhaps need to change the status to reflect the work still being done.
[daniel-lezcano, 2013-02-25] splitting the refcounting mechanism on smaller work items and moving them to 2013.03. Removing the hook probe as it is not a feature we can address immediately regarding the state of the drivers.
Meta:
Roadmap id: CARD-191
Headline: TBD
Acceptance: TBD
Work Items
Work items for 2012.06:
[daniel-lezcano] : add the "enter" function to the driver and make use of it : DONE
[daniel-lezcano] : move the 'enter_dead' to the cpuidle_driver structure (acpi) : DONE
[daniel-lezcano] : change the state 'disable' to a cpuidle state flag : DONE
[daniel-lezcano] : cleanup arch specific cpuidle flags (x86) : DONE
Work items for 2012.08:
[daniel-lezcano] : add a backpointer in the cpuidle_device structure to the states : DONE
[daniel-lezcano] : change cpuidle core to use per device latencies : DONE
[daniel-lezcano] : add a register states per cpu function : DONE
Work items for 2012.09:
[daniel-lezcano] : acpi - minor cleanups : DONE
[daniel-lezcano] : acpi - move cpuidle device structure out of power structure : DONE
[daniel-lezcano] : cpuidle - cleanup driver core code : DONE
[daniel-lezcano] : cpuidle - support for multiple drivers : DONE
[daniel-lezcano] : cpuidle - fix refcounting for the driver based on kref : DONE
[daniel-lezcano] : cpuidle - use this new refcounting for domain.c : DONE
[daniel-lezcano] : cpuidle - use this new refcounting for processor_idle.c : DONE
[daniel-lezcano] : cpuidle - use this new refcounting for intel_idle.c : DONE
[daniel-lezcano] : cpuidle - use this new refcounting for ppc : DONE
[daniel-lezcano] : cpuidle - remove the unused functions : DONE
[daniel-lezcano] : cpuidle - sysfs remove get_driver : DONE
Work items for 2012.10:
[daniel-lezcano] : cpuidle - sysfs cleanup for multiple drivers : DONE
[daniel-lezcano] : cpuidle - upstream sysfs cleanup : DONE
[daniel-lezcano] : cpuidle - multiple drivers support V2 (ifdefs) : DONE
[daniel-lezcano] : cpuidle - multiple drivers support V2 (get_cpu) : DONE
[daniel-lezcano] : cpuidle - multiple drivers support V2 (dev instead of cpu) : DONE
[daniel-lezcano] : cpuidle - multiple drivers support V2 (sysfs) : DONE
[daniel-lezcano] : cpuidle - multiple drivers support V3 upstreaming : DONE
[daniel-lezcano] : cpuidle - respin the new refcounting on top of V3 : DONE
Work items for 2013.01:
[daniel-lezcano] : cpuidle - fix lock contention in the idle path : DONE
[daniel-lezcano] : cpuidle - upstream the fix : DONE
[daniel-lezcano] : cpuidle - cleanup origen cpuidle driver init function : DONE
[daniel-lezcano] : cpuidle - upstream the cleanup : DONE
[daniel-lezcano] : cpuidle - fix origen cpuidle driver with sysfs : DONE
[daniel-lezcano] : cpuidle - upstream the fix : DONE