public class GovernorInteractive extends Governor
Modifier and Type | Field | Description |
---|---|---|
static long |
MAX_ABOVE_HIGH_SPEED_DELAY |
Maximum value of above high speed delay time: microseconds.
|
static long |
MAX_BOOSTPULSE_DURATION |
Maximum value of boost pulse duration: microseconds.
|
static long |
MAX_MIN_SAMPLE_TIME |
Maximum value of minimum sample time: microseconds.
|
static long |
MAX_TIMER_RATE |
Maximum value of timer rate: microseconds.
|
static long |
MAX_TIMER_SLACK |
Maximum value of timer slack: microseconds.
|
governorType, manager, PATH_GOVERNOR_SETTINGS
Modifier and Type | Method | Description |
---|---|---|
void |
disableBoost() |
Disables the boost.
|
void |
enableBoost() |
Enables the boost.
|
long |
getAboveHiSpeedDelay() |
Gets the above high speed delay time in uS (10^-6 seconds).
|
boolean |
getBoost() |
Returns whether boost is enabled or disabled.
|
long |
getBoostPulseDuration() |
Gets the length of time to hold CPU speed in uS (10^-6 seconds) at high
speed frequency on a boost pulse (@see #CPUManager.boostPulse()),
before allowing speed to drop according to load as usual.
|
int |
getGoHiSpeedLoad() |
Gets the CPU load percentage at which to ramp to the intermediate 'High
speed'.
|
int |
getHiSpeedFreq() |
Gets the high speed frequency value at which to initially ramp when CPU
load hits the high speed load value.
|
long |
getMinSampleTime() |
Gets the minimum sample time in uS (10^-6 seconds).
|
protected java.lang.String |
getTag() |
Returns the class tag used for logging purposes.
|
long |
getTimerRate() |
Gets the sample rate in uS (10^-6 seconds) for reevaluating CPU load
when the system is not idle.
|
long |
getTimerSlack() |
Gets the maximum additional time in uS (10^-6 seconds) to defer handling
the governor sampling timer beyond 'Timer rate' when running at speeds
above the minimum.
|
void |
setAboveHiSpeedDelay(long delay) |
Sets the above high speed delay time in uS (10^-6 seconds).
|
void |
setBoostPulseDuration(long time) |
Sets the length of time in uS (10^-6 seconds) to hold CPU speed at high
speed frequency on a write boost pulse (@see #CPUManager.boostPulse()),
before allowing speed to drop according to load as usual.
|
void |
setGoHiSpeedLoad(int load) |
Sets the CPU load percentage at which to ramp to the intermediate 'High
speed'.
|
void |
setHiSpeedFreq(int frequency) |
Sets the high speed frequency value at which to initially ramp when CPU
load hits the high speed load value.
|
void |
setMinSampleTime(long time) |
Sets the minimum sample time in uS (10^-6 seconds).
|
void |
setTimerRate(long rate) |
Sets the sample rate in uS (10^-6 seconds) for reevaluating CPU load
when the system is not idle.
|
void |
setTimerSlack(long time) |
Sets the maximum additional time in uS (10^-6 seconds) to defer handling
the governor sampling timer beyond 'Timer rate' when running at speeds
above the minimum.
|
getGovernorType, getSettingPath, readFile, writeFile
public static final long MAX_MIN_SAMPLE_TIME
public static final long MAX_ABOVE_HIGH_SPEED_DELAY
public static final long MAX_TIMER_RATE
public static final long MAX_TIMER_SLACK
public static final long MAX_BOOSTPULSE_DURATION
protected java.lang.String getTag()
Governor
public void setMinSampleTime(long time) throws CPUException
Default is 80000 uS.
time
- The new minimum sample time in uS (10^-6 seconds)CPUException
- If there is an error during the configuration
process.java.lang.IllegalArgumentException
- If time < 0
or
if time > MAX_MIN_SAMPLE_TIME
.MAX_MIN_SAMPLE_TIME
,
getMinSampleTime()
public long getMinSampleTime() throws CPUException
Default is 80000 uS.
CPUException
- If there is an error during the configuration
process.setMinSampleTime(long)
public void setHiSpeedFreq(int frequency) throws CPUException
Default is maximum speed.
frequency
- The new high speed frequency in Hz.CPUException
- If there is an error during the configuration
process.java.lang.IllegalArgumentException
- If frequency < 0
.getHiSpeedFreq()
public int getHiSpeedFreq() throws CPUException
CPUException
- If there is an error during the configuration
process.setHiSpeedFreq(int)
public void setGoHiSpeedLoad(int load) throws CPUException
Default is 85%.
load
- The new CPU load percentage to ramp.CPUException
- If there is an error during the configuration
process.java.lang.IllegalArgumentException
- If load < 0
or
if load > 100
.getGoHiSpeedLoad()
public int getGoHiSpeedLoad() throws CPUException
Default is 85%.
CPUException
- If there is an error during the configuration
process.setGoHiSpeedLoad(int)
public void setAboveHiSpeedDelay(long delay) throws CPUException
Default is 20000 uS.
delay
- The new above high speed delay in uS.CPUException
- If there is an error during the configuration
process.java.lang.IllegalArgumentException
- If delay < 0
or
if delay > MAX_ABOVE_HIGH_SPEED_DELAY
.MAX_ABOVE_HIGH_SPEED_DELAY
,
getAboveHiSpeedDelay()
public long getAboveHiSpeedDelay() throws CPUException
Default is 20000 uS.
CPUException
- If there is an error during the configuration
process.setAboveHiSpeedDelay(long)
public void setTimerRate(long rate) throws CPUException
Default is 20000 uS.
rate
- The new sample rate in uS.CPUException
- If there is an error during the configuration
process.java.lang.IllegalArgumentException
- If rate < 0
or
if rate > MAX_TIMER_RATE
.MAX_TIMER_RATE
,
getTimerRate()
public long getTimerRate() throws CPUException
Default is 20000 uS.
CPUException
- If there is an error during the configuration
process.setTimerRate(long)
public void setTimerSlack(long time) throws CPUException
For example, if 'Timer rate' is 20000uS and 'Timer slack' is 10000uS then timers will be deferred for up to 30ms when not at lowest speed. A value of -1 means defer timers indefinitely at all speeds.
Default is 80000 uS.
time
- The new timer slack in uS.CPUException
- If there is an error during the configuration
process.java.lang.IllegalArgumentException
- If time < -1
or
if time > MAX_TIMER_SLACK
.MAX_TIMER_SLACK
,
getTimerSlack()
public long getTimerSlack() throws CPUException
For example, if 'Timer rate' is 20000uS and 'Timer slack' is 10000uS then timers will be deferred for up to 30ms when not at lowest speed. A value of -1 means defer timers indefinitely at all speeds.
Default is 80000 uS.
CPUException
- If there is an error during the configuration
process.setTimerSlack(long)
public void enableBoost() throws CPUException
Disabled by default.
CPUException
- If there is an error during the configuration
process.disableBoost()
public void disableBoost() throws CPUException
Disabled by default.
CPUException
- If there is an error during the configuration
process.enableBoost()
public boolean getBoost() throws CPUException
Disabled by default.
true
if boost is enabled, false
if it is
disabled.CPUException
- If there is an error during the configuration
process.enableBoost()
,
disableBoost()
public void setBoostPulseDuration(long time) throws CPUException
Default is 80000 uS.
time
- The length in uS of the pulse duration.CPUException
- If there is an error during the configuration
process.java.lang.IllegalArgumentException
- If time < 0
or
if time > MAX_BOOSTPULSE_DURATION
.MAX_BOOSTPULSE_DURATION
,
getBoostPulseDuration()
,
CPUManager.boostPulse()
public long getBoostPulseDuration() throws CPUException
Default is 80000 uS.
CPUException
- If there is an error during the configuration
process.setBoostPulseDuration(long)
,
CPUManager.boostPulse()