geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
TRLFrequencyLimitDetector.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef TRLFREQUENCYLIMITDETECTOR_HPP_INCLUDE
7 #define TRLFREQUENCYLIMITDETECTOR_HPP_INCLUDE
8 
10 
11 #include <memory>
12 #include <utility>
13 #include <vector>
14 
15 namespace geopm
16 {
17  // A frequency limit detector that depends on CPU package turbo ratio limits
19  {
20  public:
22  PlatformIO &platform_io,
23  const PlatformTopo &);
24 
26  const std::vector<double> &observed_core_frequencies) override;
27  std::vector<std::pair<unsigned int, double> > get_core_frequency_limits(
28  unsigned int core_idx) const override;
29  double get_core_low_priority_frequency(unsigned int core_idx) const override;
30 
31  private:
32  unsigned int m_package_count;
33  size_t m_core_count;
34  const double M_CPU_FREQUENCY_MAX;
35  const double M_CPU_FREQUENCY_STICKER;
36  std::vector<std::vector<int> > m_cores_in_packages;
37  std::vector<std::vector<std::pair<unsigned int, double> > > m_core_frequency_limits;
38  std::vector<double> m_core_lp_frequencies;
39  };
40 }
41 
42 #endif
Detect maximum achievable frequency limits of CPU cores.
Definition: FrequencyLimitDetector.hpp:24
Definition: TRLFrequencyLimitDetector.hpp:19
double get_core_low_priority_frequency(unsigned int core_idx) const override
Estimate the low priority frequency of a given core.
Definition: TRLFrequencyLimitDetector.cpp:68
void update_max_frequency_estimates(const std::vector< double > &observed_core_frequencies) override
Update the estimates for maximum achievable core frequencies.
Definition: TRLFrequencyLimitDetector.cpp:41
TRLFrequencyLimitDetector(PlatformIO &platform_io, const PlatformTopo &)
Definition: TRLFrequencyLimitDetector.cpp:21
std::vector< std::pair< unsigned int, double > > get_core_frequency_limits(unsigned int core_idx) const override
Estimate the maximum achievable frequencies of a given core.
Definition: TRLFrequencyLimitDetector.cpp:63
Definition: Accumulator.cpp:12