X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvm_power_manager%2Fpower_manager.h;h=e324766b6f56daf6c36a074fc212929ca778d501;hb=48f9faddc65d3a45cdd7e41fef49a91cfc156d04;hp=c3673844c6f9227b12e1454f39e1e3097f2813ec;hpb=1aaa1b2bd4d38f16568a956d83268748acace0d1;p=dpdk.git diff --git a/examples/vm_power_manager/power_manager.h b/examples/vm_power_manager/power_manager.h index c3673844c6..e324766b6f 100644 --- a/examples/vm_power_manager/power_manager.h +++ b/examples/vm_power_manager/power_manager.h @@ -8,12 +8,24 @@ #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; }; struct core_info { @@ -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 256 /** * Initialize power management. * Initializes resources and verifies the number of CPUs on the system.