#include <stdio.h>
#include "master.h"
Go to the source code of this file.
Convert raw bits of MSR_TURBO_ACTIVATION_RATIO to human-readable values.
- Parameters
-
[in] | socket | Unique socket/package identifier. |
[out] | info | Data for turbo activation ratio. |
Convert raw bits of turbo ratio limit register to human-readable values.
- Parameters
-
[in] | socket | Unique socket/package identifier. |
[out] | info | Data for turbo ratio limit. |
[out] | info2 | Data for turbo ratio limit 1 (platform dependent). |
void disable_turbo |
( |
void |
| ) |
|
Disable turbo by modifying IA32_PERF_CTL on each logical processor.
Disable Intel Dynamic Acceleration (IDA) and Intel Turbo Boost Technology by setting bit 32 of IA32_PERF_CTL to 1. This bit is not shared across logical processors in a package, so it must be modified to the same value across all logical processors in the same package.
void dump_turbo |
( |
FILE * |
writedest | ) |
|
Print turbo data for each logical processor.
For each logical processor, print the unique core identifier, the value of bit 32 for IA32_PERF_CTL (1 indicates IDA/Turbo Boost is enabled) and the value of bit 38 for IA32_MISC_ENABLE (1 indicates support for IDA/Turbo Boost by the platform).
- Parameters
-
[in] | writedest | File stream where output will be written to. |
void enable_turbo |
( |
void |
| ) |
|
Enable turbo by modifying IA32_PERF_CTL on each logical processor.
Enable Intel Dynamic Acceleration (IDA) and Intel Turbo Boost Technology by setting bit 32 of IA32_PERF_CTL to 0. This bit is not shared across logical processors in a package, so it must be modified to the same value across all logical processors in the same package.
Read value of the MSR_TURBO_ACTIVATION_RATIO register and translate bit fields to human-readable values.
- Parameters
-
[in] | socket | Unique socket/package identifier. |
[out] | info | Data for turbo activation ratio. |
- Returns
- 0 if successful, else -1 if rapl_storage() fails.
Read value of the turbo ratio limit register and translate bit fields to human-readable values.
- Parameters
-
[in] | socket | Unique socket/package identifier. |
[out] | info | Data for turbo ratio limit. |
[out] | info2 | Data for turbo ratio limit 1 (platform dependent). |
- Returns
- 0 if successful, else -1 if rapl_storage() fails.
void turbo_storage |
( |
uint64_t *** |
val | ) |
|
Allocate array for storing raw register data from IA32_PERF_CTL.
There are plans to use a struct to make the indirection less crazy.
- Parameters
-
[in] | val | Pointer to array of raw IA32_PERF_CTL data, length equal to the total number of logical processors. |