mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-19 12:24:32 +00:00
8f2ff4d2f8
This commit resolves a couple of issues that were causing impropper cluster shutdown tracking in the cpustates script. - requested_states in the PowerStateProcessor was being initalized to -1 instead of None if no state was requested; the later checks are against None. - requested_states was not being set if the request could be satisfied immediately, and was being cleared upon being statisfied at a later time. This caused a problem when a core leaves idle and then tries to re-enter cluster shutdown. Here is an example sequence of events that illustrates the issue (assume core0 and core1 are the only two cores on a cluster): 1. both cores are running 2. core0 requests cluster-sleep. As core1 is running, it is put into core-sleep instead, and its request is saved. 3. core1 requests cluster-sleep. As core0 has a pending request for cluster-sleep, both cores are put into cluster-sleep and the pending request is cleared. 4. core1 becomes active. core0 is elevated to core-sleep. 5. core1 tries to enter cluster-sleep. Since core0 is currently in core-sleep (and its prior request has laredy been cleared), core1 is put into core-sleep instead, and its request is saved. This is an ERROR as but cores have in fact requested cluster-sleep at this stage. If, in step 4., core0 becomes active instead, exactly the same situation will result, as core1 was put into cluster-sleep immediately and its request was never saved. Idle state requests are now always tracked on entry and are only cleared when the core leave idle. - Also removed a pointless identy assignment.