Commit d04bbfe1 authored by Ondrej Vysocky's avatar Ondrej Vysocky

ENH now is possible to set turbo core frequency #38

parent faf13ad8
......@@ -77,8 +77,9 @@ void Environment::getFrequenciesLimits()
frequencyBounderyFile.open ("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq");
frequencyBounderyFile >> freqBound;
frequencyBounderyFile.close();
FreqLimits[SYS_OTHER].maxCoreFreq = std::stoi(freqBound) / CPUFREQ_FREQ_MULT;
FreqLimits[SYS_OTHER].defaultCoreFreq = FreqLimits[SYS_OTHER].maxCoreFreq;
FreqLimits[SYS_OTHER].maxCoreFreq = std::stoi(freqBound);
FreqLimits[SYS_OTHER].defaultCoreFreq = FreqLimits[SYS_OTHER].maxCoreFreq / CPUFREQ_FREQ_MULT;
FreqLimits[SYS_OTHER].maxCoreFreq = FreqLimits[SYS_OTHER].defaultCoreFreq + (FreqLimits[SYS_OTHER].maxCoreFreq % CPUFREQ_FREQ_MULT ? 1 : 0);
frequencyBounderyFile.open ("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq");
frequencyBounderyFile >> freqBound;
frequencyBounderyFile.close();
......@@ -287,6 +288,8 @@ void Environment::uncoreFrequency(uint64_t maxFreq, uint64_t minFreq, int socket
}
MERIC_INFO << "X86ADAPT set uncore frequency to: "<< maxFreq;
if (maxFreq != minFreq)
MERIC_INFO << " - " << minFreq;
int max = NODE_SIZE_SOCKET;
int die=0;
if (socket != -1 && socket < max)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment