X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvm_power_manager%2Fpower_manager.h;h=d35f8cbe01f89982b16fa20fc3542fba7173eb94;hb=0a65bf8d4124866678f3ddb816d36aae66f791eb;hp=605b3c8f60bc1fc1bf94ca4b14ebccbd7c9f6b5b;hpb=711f43ba568acadf6cbccb9f8a29abf0fb3baa25;p=dpdk.git diff --git a/examples/vm_power_manager/power_manager.h b/examples/vm_power_manager/power_manager.h index 605b3c8f60..d35f8cbe01 100644 --- a/examples/vm_power_manager/power_manager.h +++ b/examples/vm_power_manager/power_manager.h @@ -8,18 +8,30 @@ #ifdef __cplusplus extern "C" { #endif + +#define FREQ_WINDOW_SIZE 32 + +enum { + FREQ_UNKNOWN, + FREQ_MIN, + FREQ_MAX +}; + struct core_details { uint64_t last_branches; uint64_t last_branch_misses; uint16_t global_enabled_cpus; uint16_t oob_enabled; int msr_fd; + uint16_t freq_directions[FREQ_WINDOW_SIZE]; + uint16_t freq_window_idx; + uint16_t freq_state; + float branch_ratio_threshold; }; struct core_info { uint16_t core_count; struct core_details *cd; - float branch_ratio_threshold; }; #define BRANCH_RATIO_THRESHOLD 0.1 @@ -32,8 +44,6 @@ core_info_init(void); #define RTE_LOGTYPE_POWER_MANAGER RTE_LOGTYPE_USER1 -/* Maximum number of CPUS to manage */ -#define POWER_MGR_MAX_CPUS 64 /** * Initialize power management. * Initializes resources and verifies the number of CPUs on the system.