Files
MuditaOS/module-sys/SystemManager/doc/data/CpuFreqChangeAlgorithm.puml
Maciej Gibowicz 8d79f27d51 [EGD-5324] Add Low Power documentation
Documentation describing the Low Power control algorithm and
synchronization with the system using dedicated sentinels and drivers.
2021-02-16 09:03:21 +01:00

40 lines
810 B
Plaintext

@startuml
start
if (cpuLoad > frequencyShiftUpperThreshold) then (yes)
: aboveThresholdCounter++
belowThresholdCounter = 0;
else (no)
if (cpuLoad < frequencyShiftLowerThreshold) then (yes)
: belowThresholdCounter++
aboveThresholdCounter = 0;
else (no)
: belowThresholdCounter = 0
aboveThresholdCounter = 0;
endif
endif
if (
aboveThresholdCounter >= maxAboveThresholdCount
or
minFrequencyRequested > currentCpuFrequency
) then (yes)
: IncreaseCpuFrequency()
belowThresholdCounter = 0
aboveThresholdCounter = 0;
else (no)
if (
belowThresholdCounter >= maxBelowThresholdCount
and
currentCpuFreq > minFrequencyRequested
) then (yes)
: DecreaseCpuFrequency()
belowThresholdCounter = 0
aboveThresholdCounter = 0;
endif
endif
stop
@enduml