#include <cpufreq_interface.h>
Inheritance diagram for CPUFreq_Interface:
Public Member Functions | |
CPUFreq_Interface (std::list< int > cpu_list) | |
constructor | |
virtual | ~CPUFreq_Interface () |
destructor | |
virtual bool | init ()=0 |
checks if current cpu_id has a cpufreq directory and that it is no symlink | |
virtual int | adjustSpeed ()=0 |
adjusts speeds | |
virtual void | reinitSpeed ()=0 |
reinits speeds | |
virtual void | setConfig ()=0 |
set configuration in initialize values | |
void | setConfigs (int high_cpu, int max_limit, int hysters, int consider_nice) |
Update configs and apply them. | |
int | setGovernor (const std::string &new_governor) |
set a ne cpufreq governor | |
int | setMode (CPUFREQ_MODE mode) |
set the current cpufreq policy | |
virtual bool | readFrequencies ()=0 |
reads out frequencies | |
CPUFREQ_MODE | getMode () |
get current cpufreq policy | |
Static Public Member Functions | |
static bool | read_line (const char *filename, char *line, unsigned len) |
read a line from a file | |
static bool | write_line (const char *filename, const char *fmt,...) |
write a line to a file | |
Static Protected Member Functions | |
static unsigned | read_value (const char *filename) |
read an integer value from a file | |
Protected Attributes | |
string | GOVERNOR_FILE |
file where active governor is in | |
string | MIN_SPEED_FILE |
file containing the minimum freq | |
string | MAX_SPEED_FILE |
file containing the maximum freq | |
string | AVAILABLE_FREQS_FILE |
file containing available frequencies | |
int | _cpu_max |
value specifying when to switch up | |
int | _cpu_hysteresis |
value avoiding constant up/down switching | |
int | _high_cpu_limit |
if the load difference is higher than this go directly for full speed | |
int | _consider_nice |
if niced processes should also count | |
CPUFREQ_MODE | _mode |
stores the current cpufreq policy | |
std::list< int > | _cpu_cores |
list holding all cores which are affected by this interface |
|
constructor
|
|
destructor
|
|
adjusts speeds
Implemented in CPUFreq_Userspace, and CPUFreq_Kernel. |
|
get current cpufreq policy
|
|
checks if current cpu_id has a cpufreq directory and that it is no symlink
Implemented in CPUFreq_Userspace, and CPUFreq_Kernel. |
|
read a line from a file
|
|
read an integer value from a file
|
|
reads out frequencies
Implemented in CPUFreq_Userspace, and CPUFreq_Kernel. |
|
reinits speeds function for suspend workaround. after resuming the frequency might have changed and we haven't recognized. This could possibly break old PowerNow! machines, but as far as I know jumping more than one frequency at once is fixed in kernel module for that machines Implemented in CPUFreq_Userspace, and CPUFreq_Kernel. |
|
set configuration in initialize values
Implemented in CPUFreq_Userspace, and CPUFreq_Kernel. |
|
Update configs and apply them.
|
|
set a ne cpufreq governor
|
|
set the current cpufreq policy _PERFORMANCE, _DYNAMIC, _POWERSAVE
If the call fails the cpufreq classes are destroyed, isSupported will return false and you must not call any CPUFreq functions any more (in fact these calls should be just ignored, but better be careful) |
|
write a line to a file
|
|
if niced processes should also count not all of those work with "kernel" methods. |
|
list holding all cores which are affected by this interface
|
|
value avoiding constant up/down switching
|
|
value specifying when to switch up
|
|
if the load difference is higher than this go directly for full speed
|
|
stores the current cpufreq policy (powersave, performance, dynamic) |
|
file containing available frequencies
|
|
file where active governor is in
|
|
file containing the maximum freq
|
|
file containing the minimum freq
|