geopm
3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
|
#include <MSRIOImp.hpp>
Public Member Functions | |
MSRIOImp ()=delete | |
MSRIOImp (std::shared_ptr< MSRPath > path) | |
MSRIOImp (int num_cpu, std::shared_ptr< MSRPath > path, std::shared_ptr< IOUring > batch_reader, std::shared_ptr< IOUring > batch_writer) | |
MSRIOImp (const MSRIOImp &other)=delete | |
MSRIOImp & | operator= (const MSRIOImp &other)=delete |
virtual | ~MSRIOImp () |
uint64_t | read_msr (int cpu_idx, uint64_t offset) override |
Read from a single MSR on a CPU. More... | |
void | write_msr (int cpu_idx, uint64_t offset, uint64_t raw_value, uint64_t write_mask) override |
Write to a single MSR on a CPU. More... | |
int | create_batch_context (void) override |
Add a new batch context to the set of managed contexts. More... | |
int | add_read (int cpu_idx, uint64_t offset) override |
Extend the set of MSRs for batch read with a single offset. Note: uses the default batch context. More... | |
int | add_read (int cpu_idx, uint64_t offset, int batch_ctx) override |
Extend the set of MSRs for batch read with a single offset. More... | |
void | read_batch () override |
Batch read a set of MSRs configured by a previous call to the batch_config() method. The memory used to store the result should have been returned by add_read(). Note: uses the default batch context. More... | |
void | read_batch (int batch_ctx) override |
Batch read a set of MSRs configured by a previous call to the batch_config() method. The memory used to store the result should have been returned by add_read(). More... | |
uint64_t | sample (int batch_idx) const override |
Read the full 64-bit value of the MSR that was previously added to the MSRIO with add_read(). read_batch() must be called prior to calling this function. Note: uses the default batch context. More... | |
uint64_t | sample (int batch_idx, int batch_ctx) const override |
Read the full 64-bit value of the MSR that was previously added to the MSRIO with add_read(). read_batch() must be called prior to calling this function. More... | |
void | write_batch () override |
Write all adjusted values. Note: uses the default batch context. More... | |
void | write_batch (int batch_ctx) override |
Write all adjusted values. More... | |
int | add_write (int cpu_idx, uint64_t offset) override |
Add another offset to the list of MSRs to be written in batch. Note: uses the default batch context. More... | |
int | add_write (int cpu_idx, uint64_t offset, int batch_ctx) override |
Add another offset to the list of MSRs to be written in batch. More... | |
void | adjust (int batch_idx, uint64_t value, uint64_t write_mask) override |
Adjust a value that was previously added with the add_write() method. Note: uses the default batch context. More... | |
void | adjust (int batch_idx, uint64_t value, uint64_t write_mask, int batch_ctx) override |
Adjust a value that was previously added with the add_write() method. More... | |
uint64_t | system_write_mask (uint64_t offset) override |
Return the system write mask for a given offset. More... | |
Public Member Functions inherited from geopm::MSRIO | |
MSRIO ()=default | |
virtual | ~MSRIO ()=default |
Additional Inherited Members | |
Public Types inherited from geopm::MSRIO | |
enum | m_driver_e { M_DRIVER_MSRSAFE , M_DRIVER_MSR , M_NUM_DRIVER } |
Static Public Member Functions inherited from geopm::MSRIO | |
static std::unique_ptr< MSRIO > | make_unique (int driver_type) |
Returns a unique_ptr to a concrete object constructed using the underlying implementation. More... | |
|
delete |
geopm::MSRIOImp::MSRIOImp | ( | std::shared_ptr< MSRPath > | path | ) |
geopm::MSRIOImp::MSRIOImp | ( | int | num_cpu, |
std::shared_ptr< MSRPath > | path, | ||
std::shared_ptr< IOUring > | batch_reader, | ||
std::shared_ptr< IOUring > | batch_writer | ||
) |
|
delete |
|
virtual |
|
overridevirtual |
Extend the set of MSRs for batch read with a single offset. Note: uses the default batch context.
[in] | cpu_idx | logical Linux CPU index to read from when read_batch() method is called. |
[in] | offset | MSR offset to be read when read_batch() is called. |
Implements geopm::MSRIO.
|
overridevirtual |
Extend the set of MSRs for batch read with a single offset.
[in] | cpu_idx | logical Linux CPU index to read from when read_batch() method is called. |
[in] | offset | MSR offset to be read when read_batch() is called. |
[in] | batch_ctx | batch context index where the read will be added. |
Implements geopm::MSRIO.
|
overridevirtual |
Add another offset to the list of MSRs to be written in batch. Note: uses the default batch context.
[in] | cpu_idx | logical Linux CPU index to write to when write_batch() method is called. |
[in] | offset | MSR offset to be written when write_batch() method is called. |
Implements geopm::MSRIO.
|
overridevirtual |
Add another offset to the list of MSRs to be written in batch.
[in] | cpu_idx | logical Linux CPU index to write to when write_batch() method is called. |
[in] | offset | MSR offset to be written when write_batch() method is called. |
[in] | batch_ctx | batch context index where the write will be added. |
Implements geopm::MSRIO.
|
overridevirtual |
Adjust a value that was previously added with the add_write() method. Note: uses the default batch context.
Implements geopm::MSRIO.
|
overridevirtual |
Adjust a value that was previously added with the add_write() method.
[in] | batch_ctx | index of batch context where value will be adjusted. |
Implements geopm::MSRIO.
|
overridevirtual |
Add a new batch context to the set of managed contexts.
Implements geopm::MSRIO.
|
overridevirtual |
Batch read a set of MSRs configured by a previous call to the batch_config() method. The memory used to store the result should have been returned by add_read(). Note: uses the default batch context.
Implements geopm::MSRIO.
|
overridevirtual |
Batch read a set of MSRs configured by a previous call to the batch_config() method. The memory used to store the result should have been returned by add_read().
[in] | batch_ctx | index for batch context to use for the read. |
Implements geopm::MSRIO.
|
overridevirtual |
Read from a single MSR on a CPU.
[in] cpu_idx logical Linux CPU index to read from.
[in] | offset | The MSR offset to read from. |
Implements geopm::MSRIO.
|
overridevirtual |
Read the full 64-bit value of the MSR that was previously added to the MSRIO with add_read(). read_batch() must be called prior to calling this function. Note: uses the default batch context.
Implements geopm::MSRIO.
|
overridevirtual |
Read the full 64-bit value of the MSR that was previously added to the MSRIO with add_read(). read_batch() must be called prior to calling this function.
[in] | batch_ctx | index of batch context from which the value will be read. |
Implements geopm::MSRIO.
|
overridevirtual |
Return the system write mask for a given offset.
[in] | offset | MSR offset to query |
Implements geopm::MSRIO.
|
overridevirtual |
Write all adjusted values. Note: uses the default batch context.
Implements geopm::MSRIO.
|
overridevirtual |
Write all adjusted values.
[in] | batch_ctx | index for batch context to use for the write. |
Implements geopm::MSRIO.
|
overridevirtual |
Write to a single MSR on a CPU.
[in] | cpu_idx | logical Linux CPU index to write to. |
[in] | offset | The MSR offset to write to. |
[in] | raw_value | The raw encoded MSR value to write, only bits where the write_mask is set will be written, other bits in the MSR will be unmodified. |
[in] | write_mask | The mask determines the bits of the MSR that will be modified. An error will occur if bits are set in the raw_value that are not in the write mask. |
Implements geopm::MSRIO.