6 #ifndef POWERBALANCERIMP_HPP_INCLUDE
7 #define POWERBALANCERIMP_HPP_INCLUDE
12 #include "geopm_time.h"
23 PowerBalancerImp(
double ctl_latency,
double trial_delta,
int num_sample,
double measure_duration);
39 bool is_limit_stable(
void);
41 const double M_CONTROL_LATENCY;
42 const double M_MIN_TRIAL_DELTA;
43 const int M_MIN_NUM_SAMPLE;
44 const double M_MIN_DURATION;
45 const double M_RUNTIME_FRACTION;
53 struct geopm_time_s m_power_limit_change_time;
54 double m_target_runtime;
56 double m_runtime_sample;
58 std::unique_ptr<CircularBuffer<double> > m_runtime_buffer;
59 std::vector<double> m_runtime_vec;
Definition: PowerBalancerImp.hpp:17
Stay within a power cap but redistribute power to optimize performance. An average per compute node p...
Definition: PowerBalancer.hpp:20
Definition: PowerBalancerImp.hpp:20
PowerBalancerImp(double ctl_latency, double trial_delta, int num_sample, double measure_duration)
Construct a testable PowerBalancerImp object.
Definition: PowerBalancer.cpp:33
void target_runtime(double largest_runtime) override
Definition: PowerBalancer.cpp:144
void calculate_runtime_sample(void) override
Sample the measured runtimes under the current power cap in the first phase of execution....
Definition: PowerBalancer.cpp:134
double power_cap(void) const override
The current power cap which cannot be exceeded without breaking contract that the average power budge...
Definition: PowerBalancer.cpp:61
void power_limit_adjusted(double limit) override
Notify power balancer that a new limit has been set with the governor.
Definition: PowerBalancer.cpp:66
double power_limit(void) const override
Returns the current power limit prescribed for this node.
Definition: PowerBalancer.cpp:82
double power_slack(void) override
Query the difference between the last power cap setting and the current power limit....
Definition: PowerBalancer.cpp:183
bool is_target_met(double measured_runtime) override
During the second phase of execution the power limit is decreased until the epoch runtime on the comp...
Definition: PowerBalancer.cpp:155
bool is_runtime_stable(double measured_runtime) override
Update the object with a runtime measured under the current power limit and test if the current runti...
Definition: PowerBalancer.cpp:92
double runtime_sample(void) const override
Return the expected execution time of an application epoch under the current power limit.
Definition: PowerBalancer.cpp:129
virtual ~PowerBalancerImp()=default
Destroy a PowerBalancerImp object.
Definition: Accumulator.cpp:12