geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
SSTClosGovernorImp.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 #ifndef SSTCLOSGOVERNORIMP_HPP_INCLUDE
6 #define SSTCLOSGOVERNORIMP_HPP_INCLUDE
7 
8 #include "SSTClosGovernor.hpp"
9 
10 namespace geopm
11 {
13  {
14  public:
16  SSTClosGovernorImp(PlatformIO &platform_io, const PlatformTopo &platform_topo);
17  virtual ~SSTClosGovernorImp() = default;
18  void init_platform_io(void) override;
19  int clos_domain_type(void) const override;
20  void adjust_platform(const std::vector<double> &clos_by_core) override;
21  bool do_write_batch(void) const override;
22 
23  // No-op if sst-tf is not supported. Mods both tf and cp
24  void enable_sst_turbo_prioritization() override;
25  void disable_sst_turbo_prioritization() override;
26 
27  private:
28  PlatformIO &m_platform_io;
29  const PlatformTopo &m_platform_topo;
30  bool m_do_write_batch;
31  bool m_is_enabled;
32  int m_clos_assoc_ctl_domain_type;
33  size_t m_num_clos_assoc_ctl_domain;
34  int m_clos_config_ctl_domain_type;
35  size_t m_num_clos_config_ctl_domain;
36  double m_frequency_min;
37  double m_frequency_sticker;
38  double m_frequency_max;
39  std::vector<int> m_clos_control_idx;
40  std::vector<int> m_frequency_control_idx;
41  std::vector<double> m_last_clos;
42  };
43 }
44 
45 #endif // SSTCLOSGOVERNORIMP_HPP_INCLUDE
Govern class of service (CLOS) controls.
Definition: SSTClosGovernor.hpp:21
Definition: SSTClosGovernorImp.hpp:13
virtual ~SSTClosGovernorImp()=default
SSTClosGovernorImp()
Definition: SSTClosGovernor.cpp:34
void adjust_platform(const std::vector< double > &clos_by_core) override
Write CLOS controls.
Definition: SSTClosGovernor.cpp:146
void enable_sst_turbo_prioritization() override
Definition: SSTClosGovernor.cpp:169
void disable_sst_turbo_prioritization() override
Definition: SSTClosGovernor.cpp:183
int clos_domain_type(void) const override
Get the domain type of CLOS control on the platform. Users of the SSTClosGovernor can use this inform...
Definition: SSTClosGovernor.cpp:141
bool do_write_batch(void) const override
Returns true if the last call to adjust_platform requires writing controls.
Definition: SSTClosGovernor.cpp:164
void init_platform_io(void) override
Registers signals and controls with PlatformIO using the default control domain.
Definition: SSTClosGovernor.cpp:72
Definition: Accumulator.cpp:12