Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branches 'pm-devfreq', 'powercap', 'pm-docs' and 'pm-tools'

* pm-devfreq:
PM / devfreq: Use lockdep asserts instead of manual checks for locked mutex
PM / devfreq: imx-bus: Fix inconsistent IS_ERR and PTR_ERR
PM / devfreq: Replace strncpy with strscpy
PM / devfreq: imx: Register interconnect device
PM / devfreq: Add generic imx bus scaling driver
PM / devfreq: tegra30: Delete an error message in tegra_devfreq_probe()
PM / devfreq: tegra30: Make CPUFreq notifier to take into account boosting

* powercap:
powercap: RAPL: remove unused local MSR define
powercap/intel_rapl: add support for ElkhartLake

* pm-docs:
Documentation: admin-guide: pm: Document intel-speed-select

* pm-tools:
cpupower: Remove unneeded semicolon

+1127 -27
+917
Documentation/admin-guide/pm/intel-speed-select.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + ============================================================ 4 + Intel(R) Speed Select Technology User Guide 5 + ============================================================ 6 + 7 + The Intel(R) Speed Select Technology (Intel(R) SST) provides a powerful new 8 + collection of features that give more granular control over CPU performance. 9 + With Intel(R) SST, one server can be configured for power and performance for a 10 + variety of diverse workload requirements. 11 + 12 + Refer to the links below for an overview of the technology: 13 + 14 + - https://www.intel.com/content/www/us/en/architecture-and-technology/speed-select-technology-article.html 15 + - https://builders.intel.com/docs/networkbuilders/intel-speed-select-technology-base-frequency-enhancing-performance.pdf 16 + 17 + These capabilities are further enhanced in some of the newer generations of 18 + server platforms where these features can be enumerated and controlled 19 + dynamically without pre-configuring via BIOS setup options. This dynamic 20 + configuration is done via mailbox commands to the hardware. One way to enumerate 21 + and configure these features is by using the Intel Speed Select utility. 22 + 23 + This document explains how to use the Intel Speed Select tool to enumerate and 24 + control Intel(R) SST features. This document gives example commands and explains 25 + how these commands change the power and performance profile of the system under 26 + test. Using this tool as an example, customers can replicate the messaging 27 + implemented in the tool in their production software. 28 + 29 + intel-speed-select configuration tool 30 + ====================================== 31 + 32 + Most Linux distribution packages may include the "intel-speed-select" tool. If not, 33 + it can be built by downloading the Linux kernel tree from kernel.org. Once 34 + downloaded, the tool can be built without building the full kernel. 35 + 36 + From the kernel tree, run the following commands:: 37 + 38 + # cd tools/power/x86/intel-speed-select/ 39 + # make 40 + # make install 41 + 42 + Getting Help 43 + ------------ 44 + 45 + To get help with the tool, execute the command below:: 46 + 47 + # intel-speed-select --help 48 + 49 + The top-level help describes arguments and features. Notice that there is a 50 + multi-level help structure in the tool. For example, to get help for the feature "perf-profile":: 51 + 52 + # intel-speed-select perf-profile --help 53 + 54 + To get help on a command, another level of help is provided. For example for the command info "info":: 55 + 56 + # intel-speed-select perf-profile info --help 57 + 58 + Summary of platform capability 59 + ------------------------------ 60 + To check the current platform and driver capaibilities, execute:: 61 + 62 + #intel-speed-select --info 63 + 64 + For example on a test system:: 65 + 66 + # intel-speed-select --info 67 + Intel(R) Speed Select Technology 68 + Executing on CPU model: X 69 + Platform: API version : 1 70 + Platform: Driver version : 1 71 + Platform: mbox supported : 1 72 + Platform: mmio supported : 1 73 + Intel(R) SST-PP (feature perf-profile) is supported 74 + TDP level change control is unlocked, max level: 4 75 + Intel(R) SST-TF (feature turbo-freq) is supported 76 + Intel(R) SST-BF (feature base-freq) is not supported 77 + Intel(R) SST-CP (feature core-power) is supported 78 + 79 + Intel(R) Speed Select Technology - Performance Profile (Intel(R) SST-PP) 80 + ------------------------------------------------------------------------ 81 + 82 + This feature allows configuration of a server dynamically based on workload 83 + performance requirements. This helps users during deployment as they do not have 84 + to choose a specific server configuration statically. This Intel(R) Speed Select 85 + Technology - Performance Profile (Intel(R) SST-PP) feature introduces a mechanism 86 + that allows multiple optimized performance profiles per system. Each profile 87 + defines a set of CPUs that need to be online and rest offline to sustain a 88 + guaranteed base frequency. Once the user issues a command to use a specific 89 + performance profile and meet CPU online/offline requirement, the user can expect 90 + a change in the base frequency dynamically. This feature is called 91 + "perf-profile" when using the Intel Speed Select tool. 92 + 93 + Number or performance levels 94 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 95 + 96 + There can be multiple performance profiles on a system. To get the number of 97 + profiles, execute the command below:: 98 + 99 + # intel-speed-select perf-profile get-config-levels 100 + Intel(R) Speed Select Technology 101 + Executing on CPU model: X 102 + package-0 103 + die-0 104 + cpu-0 105 + get-config-levels:4 106 + package-1 107 + die-0 108 + cpu-14 109 + get-config-levels:4 110 + 111 + On this system under test, there are 4 performance profiles in addition to the 112 + base performance profile (which is performance level 0). 113 + 114 + Lock/Unlock status 115 + ~~~~~~~~~~~~~~~~~~ 116 + 117 + Even if there are multiple performance profiles, it is possible that that they 118 + are locked. If they are locked, users cannot issue a command to change the 119 + performance state. It is possible that there is a BIOS setup to unlock or check 120 + with your system vendor. 121 + 122 + To check if the system is locked, execute the following command:: 123 + 124 + # intel-speed-select perf-profile get-lock-status 125 + Intel(R) Speed Select Technology 126 + Executing on CPU model: X 127 + package-0 128 + die-0 129 + cpu-0 130 + get-lock-status:0 131 + package-1 132 + die-0 133 + cpu-14 134 + get-lock-status:0 135 + 136 + In this case, lock status is 0, which means that the system is unlocked. 137 + 138 + Properties of a performance level 139 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 140 + 141 + To get properties of a specific performance level (For example for the level 0, below), execute the command below:: 142 + 143 + # intel-speed-select perf-profile info -l 0 144 + Intel(R) Speed Select Technology 145 + Executing on CPU model: X 146 + package-0 147 + die-0 148 + cpu-0 149 + perf-profile-level-0 150 + cpu-count:28 151 + enable-cpu-mask:000003ff,f0003fff 152 + enable-cpu-list:0,1,2,3,4,5,6,7,8,9,10,11,12,13,28,29,30,31,32,33,34,35,36,37,38,39,40,41 153 + thermal-design-power-ratio:26 154 + base-frequency(MHz):2600 155 + speed-select-turbo-freq:disabled 156 + speed-select-base-freq:disabled 157 + ... 158 + ... 159 + 160 + Here -l option is used to specify a performance level. 161 + 162 + If the option -l is omitted, then this command will print information about all 163 + the performance levels. The above command is printing properties of the 164 + performance level 0. 165 + 166 + For this performance profile, the list of CPUs displayed by the 167 + "enable-cpu-mask/enable-cpu-list" at the max can be "online." When that 168 + condition is met, then base frequency of 2600 MHz can be maintained. To 169 + understand more, execute "intel-speed-select perf-profile info" for performance 170 + level 4:: 171 + 172 + # intel-speed-select perf-profile info -l 4 173 + Intel(R) Speed Select Technology 174 + Executing on CPU model: X 175 + package-0 176 + die-0 177 + cpu-0 178 + perf-profile-level-4 179 + cpu-count:28 180 + enable-cpu-mask:000000fa,f0000faf 181 + enable-cpu-list:0,1,2,3,5,7,8,9,10,11,28,29,30,31,33,35,36,37,38,39 182 + thermal-design-power-ratio:28 183 + base-frequency(MHz):2800 184 + speed-select-turbo-freq:disabled 185 + speed-select-base-freq:unsupported 186 + ... 187 + ... 188 + 189 + There are fewer CPUs in the "enable-cpu-mask/enable-cpu-list". Consequently, if 190 + the user only keeps these CPUs online and the rest "offline," then the base 191 + frequency is increased to 2.8 GHz compared to 2.6 GHz at performance level 0. 192 + 193 + Get current performance level 194 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 195 + 196 + To get the current performance level, execute:: 197 + 198 + # intel-speed-select perf-profile get-config-current-level 199 + Intel(R) Speed Select Technology 200 + Executing on CPU model: X 201 + package-0 202 + die-0 203 + cpu-0 204 + get-config-current_level:0 205 + 206 + First verify that the base_frequency displayed by the cpufreq sysfs is correct:: 207 + 208 + # cat /sys/devices/system/cpu/cpu0/cpufreq/base_frequency 209 + 2600000 210 + 211 + This matches the base-frequency (MHz) field value displayed from the 212 + "perf-profile info" command for performance level 0(cpufreq frequency is in 213 + KHz). 214 + 215 + To check if the average frequency is equal to the base frequency for a 100% busy 216 + workload, disable turbo:: 217 + 218 + # echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo 219 + 220 + Then runs a busy workload on all CPUs, for example:: 221 + 222 + #stress -c 64 223 + 224 + To verify the base frequency, run turbostat:: 225 + 226 + #turbostat -c 0-13 --show Package,Core,CPU,Bzy_MHz -i 1 227 + 228 + Package Core CPU Bzy_MHz 229 + - - 2600 230 + 0 0 0 2600 231 + 0 1 1 2600 232 + 0 2 2 2600 233 + 0 3 3 2600 234 + 0 4 4 2600 235 + . . . . 236 + 237 + 238 + Changing performance level 239 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 240 + 241 + To the change the performance level to 4, execute:: 242 + 243 + # intel-speed-select -d perf-profile set-config-level -l 4 -o 244 + Intel(R) Speed Select Technology 245 + Executing on CPU model: X 246 + package-0 247 + die-0 248 + cpu-0 249 + perf-profile 250 + set_tdp_level:success 251 + 252 + In the command above, "-o" is optional. If it is specified, then it will also 253 + offline CPUs which are not present in the enable_cpu_mask for this performance 254 + level. 255 + 256 + Now if the base_frequency is checked:: 257 + 258 + #cat /sys/devices/system/cpu/cpu0/cpufreq/base_frequency 259 + 2800000 260 + 261 + Which shows that the base frequency now increased from 2600 MHz at performance 262 + level 0 to 2800 MHz at performance level 4. As a result, any workload, which can 263 + use fewer CPUs, can see a boost of 200 MHz compared to performance level 0. 264 + 265 + Check presence of other Intel(R) SST features 266 + --------------------------------------------- 267 + 268 + Each of the performance profiles also specifies weather there is support of 269 + other two Intel(R) SST features (Intel(R) Speed Select Technology - Base Frequency 270 + (Intel(R) SST-BF) and Intel(R) Speed Select Technology - Turbo Frequency (Intel 271 + SST-TF)). 272 + 273 + For example, from the output of "perf-profile info" above, for level 0 and level 274 + 4: 275 + 276 + For level 0:: 277 + speed-select-turbo-freq:disabled 278 + speed-select-base-freq:disabled 279 + 280 + For level 4:: 281 + speed-select-turbo-freq:disabled 282 + speed-select-base-freq:unsupported 283 + 284 + Given these results, the "speed-select-base-freq" (Intel(R) SST-BF) in level 4 285 + changed from "disabled" to "unsupported" compared to performance level 0. 286 + 287 + This means that at performance level 4, the "speed-select-base-freq" feature is 288 + not supported. However, at performance level 0, this feature is "supported", but 289 + currently "disabled", meaning the user has not activated this feature. Whereas 290 + "speed-select-turbo-freq" (Intel(R) SST-TF) is supported at both performance 291 + levels, but currently not activated by the user. 292 + 293 + The Intel(R) SST-BF and the Intel(R) SST-TF features are built on a foundation 294 + technology called Intel(R) Speed Select Technology - Core Power (Intel(R) SST-CP). 295 + The platform firmware enables this feature when Intel(R) SST-BF or Intel(R) SST-TF 296 + is supported on a platform. 297 + 298 + Intel(R) Speed Select Technology Core Power (Intel(R) SST-CP) 299 + --------------------------------------------------------------- 300 + 301 + Intel(R) Speed Select Technology Core Power (Intel(R) SST-CP) is an interface that 302 + allows users to define per core priority. This defines a mechanism to distribute 303 + power among cores when there is a power constrained scenario. This defines a 304 + class of service (CLOS) configuration. 305 + 306 + The user can configure up to 4 class of service configurations. Each CLOS group 307 + configuration allows definitions of parameters, which affects how the frequency 308 + can be limited and power is distributed. Each CPU core can be tied to a class of 309 + service and hence an associated priority. The granularity is at core level not 310 + at per CPU level. 311 + 312 + Enable CLOS based prioritization 313 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 314 + 315 + To use CLOS based prioritization feature, firmware must be informed to enable 316 + and use a priority type. There is a default per platform priority type, which 317 + can be changed with optional command line parameter. 318 + 319 + To enable and check the options, execute:: 320 + 321 + # intel-speed-select core-power enable --help 322 + Intel(R) Speed Select Technology 323 + Executing on CPU model: X 324 + Enable core-power for a package/die 325 + Clos Enable: Specify priority type with [--priority|-p] 326 + 0: Proportional, 1: Ordered 327 + 328 + There are two types of priority types: 329 + 330 + - Ordered 331 + 332 + Priority for ordered throttling is defined based on the index of the assigned 333 + CLOS group. Where CLOS0 gets highest priority (throttled last). 334 + 335 + Priority order is: 336 + CLOS0 > CLOS1 > CLOS2 > CLOS3. 337 + 338 + - Proportional 339 + 340 + When proportional priority is used, there is an additional parameter called 341 + frequency_weight, which can be specified per CLOS group. The goal of 342 + proportional priority is to provide each core with the requested min., then 343 + distribute all remaining (excess/deficit) budgets in proportion to a defined 344 + weight. This proportional priority can be configured using "core-power config" 345 + command. 346 + 347 + To enable with the platform default priority type, execute:: 348 + 349 + # intel-speed-select core-power enable 350 + Intel(R) Speed Select Technology 351 + Executing on CPU model: X 352 + package-0 353 + die-0 354 + cpu-0 355 + core-power 356 + enable:success 357 + package-1 358 + die-0 359 + cpu-6 360 + core-power 361 + enable:success 362 + 363 + The scope of this enable is per package or die scoped when a package contains 364 + multiple dies. To check if CLOS is enabled and get priority type, "core-power 365 + info" command can be used. For example to check the status of core-power feature 366 + on CPU 0, execute:: 367 + 368 + # intel-speed-select -c 0 core-power info 369 + Intel(R) Speed Select Technology 370 + Executing on CPU model: X 371 + package-0 372 + die-0 373 + cpu-0 374 + core-power 375 + support-status:supported 376 + enable-status:enabled 377 + clos-enable-status:enabled 378 + priority-type:proportional 379 + package-1 380 + die-0 381 + cpu-24 382 + core-power 383 + support-status:supported 384 + enable-status:enabled 385 + clos-enable-status:enabled 386 + priority-type:proportional 387 + 388 + Configuring CLOS groups 389 + ~~~~~~~~~~~~~~~~~~~~~~~ 390 + 391 + Each CLOS group has its own attributes including min, max, freq_weight and 392 + desired. These parameters can be configured with "core-power config" command. 393 + Defaults will be used if user skips setting a parameter except clos id, which is 394 + mandatory. To check core-power config options, execute:: 395 + 396 + # intel-speed-select core-power config --help 397 + Intel(R) Speed Select Technology 398 + Executing on CPU model: X 399 + Set core-power configuration for one of the four clos ids 400 + Specify targeted clos id with [--clos|-c] 401 + Specify clos Proportional Priority [--weight|-w] 402 + Specify clos min in MHz with [--min|-n] 403 + Specify clos max in MHz with [--max|-m] 404 + 405 + For example:: 406 + 407 + # intel-speed-select core-power config -c 0 408 + Intel(R) Speed Select Technology 409 + Executing on CPU model: X 410 + clos epp is not specified, default: 0 411 + clos frequency weight is not specified, default: 0 412 + clos min is not specified, default: 0 MHz 413 + clos max is not specified, default: 25500 MHz 414 + clos desired is not specified, default: 0 415 + package-0 416 + die-0 417 + cpu-0 418 + core-power 419 + config:success 420 + package-1 421 + die-0 422 + cpu-6 423 + core-power 424 + config:success 425 + 426 + The user has the option to change defaults. For example, the user can change the 427 + "min" and set the base frequency to always get guaranteed base frequency. 428 + 429 + Get the current CLOS configuration 430 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 431 + 432 + To check the current configuration, "core-power get-config" can be used. For 433 + example, to get the configuration of CLOS 0:: 434 + 435 + # intel-speed-select core-power get-config -c 0 436 + Intel(R) Speed Select Technology 437 + Executing on CPU model: X 438 + package-0 439 + die-0 440 + cpu-0 441 + core-power 442 + clos:0 443 + epp:0 444 + clos-proportional-priority:0 445 + clos-min:0 MHz 446 + clos-max:Max Turbo frequency 447 + clos-desired:0 MHz 448 + package-1 449 + die-0 450 + cpu-24 451 + core-power 452 + clos:0 453 + epp:0 454 + clos-proportional-priority:0 455 + clos-min:0 MHz 456 + clos-max:Max Turbo frequency 457 + clos-desired:0 MHz 458 + 459 + Associating a CPU with a CLOS group 460 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 461 + 462 + To associate a CPU to a CLOS group "core-power assoc" command can be used:: 463 + 464 + # intel-speed-select core-power assoc --help 465 + Intel(R) Speed Select Technology 466 + Executing on CPU model: X 467 + Associate a clos id to a CPU 468 + Specify targeted clos id with [--clos|-c] 469 + 470 + 471 + For example to associate CPU 10 to CLOS group 3, execute:: 472 + 473 + # intel-speed-select -c 10 core-power assoc -c 3 474 + Intel(R) Speed Select Technology 475 + Executing on CPU model: X 476 + package-0 477 + die-0 478 + cpu-10 479 + core-power 480 + assoc:success 481 + 482 + Once a CPU is associated, its sibling CPUs are also associated to a CLOS group. 483 + Once associated, avoid changing Linux "cpufreq" subsystem scaling frequency 484 + limits. 485 + 486 + To check the existing association for a CPU, "core-power get-assoc" command can 487 + be used. For example, to get association of CPU 10, execute:: 488 + 489 + # intel-speed-select -c 10 core-power get-assoc 490 + Intel(R) Speed Select Technology 491 + Executing on CPU model: X 492 + package-1 493 + die-0 494 + cpu-10 495 + get-assoc 496 + clos:3 497 + 498 + This shows that CPU 10 is part of a CLOS group 3. 499 + 500 + 501 + Disable CLOS based prioritization 502 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 503 + 504 + To disable, execute:: 505 + 506 + # intel-speed-select core-power disable 507 + 508 + Some features like Intel(R) SST-TF can only be enabled when CLOS based prioritization 509 + is enabled. For this reason, disabling while Intel(R) SST-TF is enabled can cause 510 + Intel(R) SST-TF to fail. This will cause the "disable" command to display an error 511 + if Intel(R) SST-TF is already enabled. In turn, to disable, the Intel(R) SST-TF 512 + feature must be disabled first. 513 + 514 + Intel(R) Speed Select Technology - Base Frequency (Intel(R) SST-BF) 515 + ------------------------------------------------------------------- 516 + 517 + The Intel(R) Speed Select Technology - Base Frequency (Intel(R) SST-BF) feature lets 518 + the user control base frequency. If some critical workload threads demand 519 + constant high guaranteed performance, then this feature can be used to execute 520 + the thread at higher base frequency on specific sets of CPUs (high priority 521 + CPUs) at the cost of lower base frequency (low priority CPUs) on other CPUs. 522 + This feature does not require offline of the low priority CPUs. 523 + 524 + The support of Intel(R) SST-BF depends on the Intel(R) Speed Select Technology - 525 + Performance Profile (Intel(R) SST-PP) performance level configuration. It is 526 + possible that only certain performance levels support Intel(R) SST-BF. It is also 527 + possible that only base performance level (level = 0) has support of Intel 528 + SST-BF. Consequently, first select the desired performance level to enable this 529 + feature. 530 + 531 + In the system under test here, Intel(R) SST-BF is supported at the base 532 + performance level 0, but currently disabled. For example for the level 0:: 533 + 534 + # intel-speed-select -c 0 perf-profile info -l 0 535 + Intel(R) Speed Select Technology 536 + Executing on CPU model: X 537 + package-0 538 + die-0 539 + cpu-0 540 + perf-profile-level-0 541 + ... 542 + 543 + speed-select-base-freq:disabled 544 + ... 545 + 546 + Before enabling Intel(R) SST-BF and measuring its impact on a workload 547 + performance, execute some workload and measure performance and get a baseline 548 + performance to compare against. 549 + 550 + Here the user wants more guaranteed performance. For this reason, it is likely 551 + that turbo is disabled. To disable turbo, execute:: 552 + 553 + #echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo 554 + 555 + Based on the output of the "intel-speed-select perf-profile info -l 0" base 556 + frequency of guaranteed frequency 2600 MHz. 557 + 558 + 559 + Measure baseline performance for comparison 560 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 561 + 562 + To compare, pick a multi-threaded workload where each thread can be scheduled on 563 + separate CPUs. "Hackbench pipe" test is a good example on how to improve 564 + performance using Intel(R) SST-BF. 565 + 566 + Below, the workload is measuring average scheduler wakeup latency, so a lower 567 + number means better performance:: 568 + 569 + # taskset -c 3,4 perf bench -r 100 sched pipe 570 + # Running 'sched/pipe' benchmark: 571 + # Executed 1000000 pipe operations between two processes 572 + Total time: 6.102 [sec] 573 + 6.102445 usecs/op 574 + 163868 ops/sec 575 + 576 + While running the above test, if we take turbostat output, it will show us that 577 + 2 of the CPUs are busy and reaching max. frequency (which would be the base 578 + frequency as the turbo is disabled). The turbostat output:: 579 + 580 + #turbostat -c 0-13 --show Package,Core,CPU,Bzy_MHz -i 1 581 + Package Core CPU Bzy_MHz 582 + 0 0 0 1000 583 + 0 1 1 1005 584 + 0 2 2 1000 585 + 0 3 3 2600 586 + 0 4 4 2600 587 + 0 5 5 1000 588 + 0 6 6 1000 589 + 0 7 7 1005 590 + 0 8 8 1005 591 + 0 9 9 1000 592 + 0 10 10 1000 593 + 0 11 11 995 594 + 0 12 12 1000 595 + 0 13 13 1000 596 + 597 + From the above turbostat output, both CPU 3 and 4 are very busy and reaching 598 + full guaranteed frequency of 2600 MHz. 599 + 600 + Intel(R) SST-BF Capabilities 601 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 602 + 603 + To get capabilities of Intel(R) SST-BF for the current performance level 0, 604 + execute:: 605 + 606 + # intel-speed-select base-freq info -l 0 607 + Intel(R) Speed Select Technology 608 + Executing on CPU model: X 609 + package-0 610 + die-0 611 + cpu-0 612 + speed-select-base-freq 613 + high-priority-base-frequency(MHz):3000 614 + high-priority-cpu-mask:00000216,00002160 615 + high-priority-cpu-list:5,6,8,13,33,34,36,41 616 + low-priority-base-frequency(MHz):2400 617 + tjunction-temperature(C):125 618 + thermal-design-power(W):205 619 + 620 + The above capabilities show that there are some CPUs on this system that can 621 + offer base frequency of 3000 MHz compared to the standard base frequency at this 622 + performance levels. Nevertheless, these CPUs are fixed, and they are presented 623 + via high-priority-cpu-list/high-priority-cpu-mask. But if this Intel(R) SST-BF 624 + feature is selected, the low priorities CPUs (which are not in 625 + high-priority-cpu-list) can only offer up to 2400 MHz. As a result, if this 626 + clipping of low priority CPUs is acceptable, then the user can enable Intel 627 + SST-BF feature particularly for the above "sched pipe" workload since only two 628 + CPUs are used, they can be scheduled on high priority CPUs and can get boost of 629 + 400 MHz. 630 + 631 + Enable Intel(R) SST-BF 632 + ~~~~~~~~~~~~~~~~~~~~~~ 633 + 634 + To enable Intel(R) SST-BF feature, execute:: 635 + 636 + # intel-speed-select base-freq enable -a 637 + Intel(R) Speed Select Technology 638 + Executing on CPU model: X 639 + package-0 640 + die-0 641 + cpu-0 642 + base-freq 643 + enable:success 644 + package-1 645 + die-0 646 + cpu-14 647 + base-freq 648 + enable:success 649 + 650 + In this case, -a option is optional. This not only enables Intel(R) SST-BF, but it 651 + also adjusts the priority of cores using Intel(R) Speed Select Technology Core 652 + Power (Intel(R) SST-CP) features. This option sets the minimum performance of each 653 + Intel(R) Speed Select Technology - Performance Profile (Intel(R) SST-PP) class to 654 + maximum performance so that the hardware will give maximum performance possible 655 + for each CPU. 656 + 657 + If -a option is not used, then the following steps are required before enabling 658 + Intel(R) SST-BF: 659 + 660 + - Discover Intel(R) SST-BF and note low and high priority base frequency 661 + - Note the high prioity CPU list 662 + - Enable CLOS using core-power feature set 663 + - Configure CLOS parameters. Use CLOS.min to set to minimum performance 664 + - Subscribe desired CPUs to CLOS groups 665 + 666 + With this configuration, if the same workload is executed by pinning the 667 + workload to high priority CPUs (CPU 5 and 6 in this case):: 668 + 669 + #taskset -c 5,6 perf bench -r 100 sched pipe 670 + # Running 'sched/pipe' benchmark: 671 + # Executed 1000000 pipe operations between two processes 672 + Total time: 5.627 [sec] 673 + 5.627922 usecs/op 674 + 177685 ops/sec 675 + 676 + This way, by enabling Intel(R) SST-BF, the performance of this benchmark is 677 + improved (latency reduced) by 7.79%. From the turbostat output, it can be 678 + observed that the high priority CPUs reached 3000 MHz compared to 2600 MHz. 679 + The turbostat output:: 680 + 681 + #turbostat -c 0-13 --show Package,Core,CPU,Bzy_MHz -i 1 682 + Package Core CPU Bzy_MHz 683 + 0 0 0 2151 684 + 0 1 1 2166 685 + 0 2 2 2175 686 + 0 3 3 2175 687 + 0 4 4 2175 688 + 0 5 5 3000 689 + 0 6 6 3000 690 + 0 7 7 2180 691 + 0 8 8 2662 692 + 0 9 9 2176 693 + 0 10 10 2175 694 + 0 11 11 2176 695 + 0 12 12 2176 696 + 0 13 13 2661 697 + 698 + Disable Intel(R) SST-BF 699 + ~~~~~~~~~~~~~~~~~~~~~~~ 700 + 701 + To disable the Intel(R) SST-BF feature, execute:: 702 + 703 + # intel-speed-select base-freq disable -a 704 + 705 + 706 + Intel(R) Speed Select Technology - Turbo Frequency (Intel(R) SST-TF) 707 + -------------------------------------------------------------------- 708 + 709 + This feature enables the ability to set different "All core turbo ratio limits" 710 + to cores based on the priority. By using this feature, some cores can be 711 + configured to get higher turbo frequency by designating them as high priority at 712 + the cost of lower or no turbo frequency on the low priority cores. 713 + 714 + For this reason, this feature is only useful when system is busy utilizing all 715 + CPUs, but the user wants some configurable option to get high performance on 716 + some CPUs. 717 + 718 + The support of Intel(R) Speed Select Technology - Turbo Frequency (Intel(R) SST-TF) 719 + depends on the Intel(R) Speed Select Technology - Performance Profile (Intel 720 + SST-PP) performance level configuration. It is possible that only a certain 721 + performance level supports Intel(R) SST-TF. It is also possible that only the base 722 + performance level (level = 0) has the support of Intel(R) SST-TF. Hence, first 723 + select the desired performance level to enable this feature. 724 + 725 + In the system under test here, Intel(R) SST-TF is supported at the base 726 + performance level 0, but currently disabled:: 727 + 728 + # intel-speed-select -c 0 perf-profile info -l 0 729 + Intel(R) Speed Select Technology 730 + package-0 731 + die-0 732 + cpu-0 733 + perf-profile-level-0 734 + ... 735 + ... 736 + speed-select-turbo-freq:disabled 737 + ... 738 + ... 739 + 740 + 741 + To check if performance can be improved using Intel(R) SST-TF feature, get the turbo 742 + frequency properties with Intel(R) SST-TF enabled and compare to the base turbo 743 + capability of this system. 744 + 745 + Get Base turbo capability 746 + ~~~~~~~~~~~~~~~~~~~~~~~~~ 747 + 748 + To get the base turbo capability of performance level 0, execute:: 749 + 750 + # intel-speed-select perf-profile info -l 0 751 + Intel(R) Speed Select Technology 752 + Executing on CPU model: X 753 + package-0 754 + die-0 755 + cpu-0 756 + perf-profile-level-0 757 + ... 758 + ... 759 + turbo-ratio-limits-sse 760 + bucket-0 761 + core-count:2 762 + max-turbo-frequency(MHz):3200 763 + bucket-1 764 + core-count:4 765 + max-turbo-frequency(MHz):3100 766 + bucket-2 767 + core-count:6 768 + max-turbo-frequency(MHz):3100 769 + bucket-3 770 + core-count:8 771 + max-turbo-frequency(MHz):3100 772 + bucket-4 773 + core-count:10 774 + max-turbo-frequency(MHz):3100 775 + bucket-5 776 + core-count:12 777 + max-turbo-frequency(MHz):3100 778 + bucket-6 779 + core-count:14 780 + max-turbo-frequency(MHz):3100 781 + bucket-7 782 + core-count:16 783 + max-turbo-frequency(MHz):3100 784 + 785 + Based on the data above, when all the CPUS are busy, the max. frequency of 3100 786 + MHz can be achieved. If there is some busy workload on cpu 0 - 11 (e.g. stress) 787 + and on CPU 12 and 13, execute "hackbench pipe" workload:: 788 + 789 + # taskset -c 12,13 perf bench -r 100 sched pipe 790 + # Running 'sched/pipe' benchmark: 791 + # Executed 1000000 pipe operations between two processes 792 + Total time: 5.705 [sec] 793 + 5.705488 usecs/op 794 + 175269 ops/sec 795 + 796 + The turbostat output:: 797 + 798 + #turbostat -c 0-13 --show Package,Core,CPU,Bzy_MHz -i 1 799 + Package Core CPU Bzy_MHz 800 + 0 0 0 3000 801 + 0 1 1 3000 802 + 0 2 2 3000 803 + 0 3 3 3000 804 + 0 4 4 3000 805 + 0 5 5 3100 806 + 0 6 6 3100 807 + 0 7 7 3000 808 + 0 8 8 3100 809 + 0 9 9 3000 810 + 0 10 10 3000 811 + 0 11 11 3000 812 + 0 12 12 3100 813 + 0 13 13 3100 814 + 815 + Based on turbostat output, the performance is limited by frequency cap of 3100 816 + MHz. To check if the hackbench performance can be improved for CPU 12 and CPU 817 + 13, first check the capability of the Intel(R) SST-TF feature for this performance 818 + level. 819 + 820 + Get Intel(R) SST-TF Capability 821 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 822 + 823 + To get the capability, the "turbo-freq info" command can be used:: 824 + 825 + # intel-speed-select turbo-freq info -l 0 826 + Intel(R) Speed Select Technology 827 + Executing on CPU model: X 828 + package-0 829 + die-0 830 + cpu-0 831 + speed-select-turbo-freq 832 + bucket-0 833 + high-priority-cores-count:2 834 + high-priority-max-frequency(MHz):3200 835 + high-priority-max-avx2-frequency(MHz):3200 836 + high-priority-max-avx512-frequency(MHz):3100 837 + bucket-1 838 + high-priority-cores-count:4 839 + high-priority-max-frequency(MHz):3100 840 + high-priority-max-avx2-frequency(MHz):3000 841 + high-priority-max-avx512-frequency(MHz):2900 842 + bucket-2 843 + high-priority-cores-count:6 844 + high-priority-max-frequency(MHz):3100 845 + high-priority-max-avx2-frequency(MHz):3000 846 + high-priority-max-avx512-frequency(MHz):2900 847 + speed-select-turbo-freq-clip-frequencies 848 + low-priority-max-frequency(MHz):2600 849 + low-priority-max-avx2-frequency(MHz):2400 850 + low-priority-max-avx512-frequency(MHz):2100 851 + 852 + Based on the output above, there is an Intel(R) SST-TF bucket for which there are 853 + two high priority cores. If only two high priority cores are set, then max. 854 + turbo frequency on those cores can be increased to 3200 MHz. This is 100 MHz 855 + more than the base turbo capability for all cores. 856 + 857 + In turn, for the hackbench workload, two CPUs can be set as high priority and 858 + rest as low priority. One side effect is that once enabled, the low priority 859 + cores will be clipped to a lower frequency of 2600 MHz. 860 + 861 + Enable Intel(R) SST-TF 862 + ~~~~~~~~~~~~~~~~~~~~~~ 863 + 864 + To enable Intel(R) SST-TF, execute:: 865 + 866 + # intel-speed-select -c 12,13 turbo-freq enable -a 867 + Intel(R) Speed Select Technology 868 + Executing on CPU model: X 869 + package-0 870 + die-0 871 + cpu-12 872 + turbo-freq 873 + enable:success 874 + package-0 875 + die-0 876 + cpu-13 877 + turbo-freq 878 + enable:success 879 + package--1 880 + die-0 881 + cpu-63 882 + turbo-freq --auto 883 + enable:success 884 + 885 + In this case, the option "-a" is optional. If set, it enables Intel(R) SST-TF 886 + feature and also sets the CPUs to high and and low priority using Intel Speed 887 + Select Technology Core Power (Intel(R) SST-CP) features. The CPU numbers passed 888 + with "-c" arguments are marked as high priority, including its siblings. 889 + 890 + If -a option is not used, then the following steps are required before enabling 891 + Intel(R) SST-TF: 892 + 893 + - Discover Intel(R) SST-TF and note buckets of high priority cores and maximum frequency 894 + 895 + - Enable CLOS using core-power feature set - Configure CLOS parameters 896 + 897 + - Subscribe desired CPUs to CLOS groups making sure that high priority cores are set to the maximum frequency 898 + 899 + If the same hackbench workload is executed, schedule hackbench threads on high 900 + priority CPUs:: 901 + 902 + #taskset -c 12,13 perf bench -r 100 sched pipe 903 + # Running 'sched/pipe' benchmark: 904 + # Executed 1000000 pipe operations between two processes 905 + Total time: 5.510 [sec] 906 + 5.510165 usecs/op 907 + 180826 ops/sec 908 + 909 + This improved performance by around 3.3% improvement on a busy system. Here the 910 + turbostat output will show that the CPU 12 and CPU 13 are getting 100 MHz boost. 911 + The turbostat output:: 912 + 913 + #turbostat -c 0-13 --show Package,Core,CPU,Bzy_MHz -i 1 914 + Package Core CPU Bzy_MHz 915 + ... 916 + 0 12 12 3200 917 + 0 13 13 3200
+1
Documentation/admin-guide/pm/working-state.rst
··· 13 13 intel_pstate 14 14 cpufreq_drivers 15 15 intel_epb 16 + intel-speed-select
+8
drivers/devfreq/Kconfig
··· 91 91 and adjusts the operating frequencies and voltages with OPP support. 92 92 This does not yet operate with optimal voltages. 93 93 94 + config ARM_IMX_BUS_DEVFREQ 95 + tristate "i.MX Generic Bus DEVFREQ Driver" 96 + depends on ARCH_MXC || COMPILE_TEST 97 + select DEVFREQ_GOV_USERSPACE 98 + help 99 + This adds the generic DEVFREQ driver for i.MX interconnects. It 100 + allows adjusting NIC/NOC frequency. 101 + 94 102 config ARM_IMX8M_DDRC_DEVFREQ 95 103 tristate "i.MX8M DDRC DEVFREQ Driver" 96 104 depends on (ARCH_MXC && HAVE_ARM_SMCCC) || \
+1
drivers/devfreq/Makefile
··· 9 9 10 10 # DEVFREQ Drivers 11 11 obj-$(CONFIG_ARM_EXYNOS_BUS_DEVFREQ) += exynos-bus.o 12 + obj-$(CONFIG_ARM_IMX_BUS_DEVFREQ) += imx-bus.o 12 13 obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o 13 14 obj-$(CONFIG_ARM_RK3399_DMC_DEVFREQ) += rk3399_dmc.o 14 15 obj-$(CONFIG_ARM_TEGRA_DEVFREQ) += tegra30-devfreq.o
+8 -11
drivers/devfreq/devfreq.c
··· 60 60 { 61 61 struct devfreq *tmp_devfreq; 62 62 63 + lockdep_assert_held(&devfreq_list_lock); 64 + 63 65 if (IS_ERR_OR_NULL(dev)) { 64 66 pr_err("DEVFREQ: %s: Invalid parameters\n", __func__); 65 67 return ERR_PTR(-EINVAL); 66 68 } 67 - WARN(!mutex_is_locked(&devfreq_list_lock), 68 - "devfreq_list_lock must be locked."); 69 69 70 70 list_for_each_entry(tmp_devfreq, &devfreq_list, node) { 71 71 if (tmp_devfreq->dev.parent == dev) ··· 258 258 { 259 259 struct devfreq_governor *tmp_governor; 260 260 261 + lockdep_assert_held(&devfreq_list_lock); 262 + 261 263 if (IS_ERR_OR_NULL(name)) { 262 264 pr_err("DEVFREQ: %s: Invalid parameters\n", __func__); 263 265 return ERR_PTR(-EINVAL); 264 266 } 265 - WARN(!mutex_is_locked(&devfreq_list_lock), 266 - "devfreq_list_lock must be locked."); 267 267 268 268 list_for_each_entry(tmp_governor, &devfreq_governor_list, node) { 269 269 if (!strncmp(tmp_governor->name, name, DEVFREQ_NAME_LEN)) ··· 289 289 struct devfreq_governor *governor; 290 290 int err = 0; 291 291 292 + lockdep_assert_held(&devfreq_list_lock); 293 + 292 294 if (IS_ERR_OR_NULL(name)) { 293 295 pr_err("DEVFREQ: %s: Invalid parameters\n", __func__); 294 296 return ERR_PTR(-EINVAL); 295 297 } 296 - WARN(!mutex_is_locked(&devfreq_list_lock), 297 - "devfreq_list_lock must be locked."); 298 298 299 299 governor = find_devfreq_governor(name); 300 300 if (IS_ERR(governor)) { ··· 392 392 int err = 0; 393 393 u32 flags = 0; 394 394 395 - if (!mutex_is_locked(&devfreq->lock)) { 396 - WARN(true, "devfreq->lock must be locked by the caller.\n"); 397 - return -EINVAL; 398 - } 395 + lockdep_assert_held(&devfreq->lock); 399 396 400 397 if (!devfreq->governor) 401 398 return -EINVAL; ··· 765 768 devfreq->dev.release = devfreq_dev_release; 766 769 INIT_LIST_HEAD(&devfreq->node); 767 770 devfreq->profile = profile; 768 - strncpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN); 771 + strscpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN); 769 772 devfreq->previous_freq = profile->initial_freq; 770 773 devfreq->last_status.current_frequency = profile->initial_freq; 771 774 devfreq->data = data;
+179
drivers/devfreq/imx-bus.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright 2019 NXP 4 + */ 5 + 6 + #include <linux/clk.h> 7 + #include <linux/devfreq.h> 8 + #include <linux/device.h> 9 + #include <linux/module.h> 10 + #include <linux/of_device.h> 11 + #include <linux/pm_opp.h> 12 + #include <linux/platform_device.h> 13 + #include <linux/slab.h> 14 + 15 + struct imx_bus { 16 + struct devfreq_dev_profile profile; 17 + struct devfreq *devfreq; 18 + struct clk *clk; 19 + struct platform_device *icc_pdev; 20 + }; 21 + 22 + static int imx_bus_target(struct device *dev, 23 + unsigned long *freq, u32 flags) 24 + { 25 + struct dev_pm_opp *new_opp; 26 + int ret; 27 + 28 + new_opp = devfreq_recommended_opp(dev, freq, flags); 29 + if (IS_ERR(new_opp)) { 30 + ret = PTR_ERR(new_opp); 31 + dev_err(dev, "failed to get recommended opp: %d\n", ret); 32 + return ret; 33 + } 34 + dev_pm_opp_put(new_opp); 35 + 36 + return dev_pm_opp_set_rate(dev, *freq); 37 + } 38 + 39 + static int imx_bus_get_cur_freq(struct device *dev, unsigned long *freq) 40 + { 41 + struct imx_bus *priv = dev_get_drvdata(dev); 42 + 43 + *freq = clk_get_rate(priv->clk); 44 + 45 + return 0; 46 + } 47 + 48 + static int imx_bus_get_dev_status(struct device *dev, 49 + struct devfreq_dev_status *stat) 50 + { 51 + struct imx_bus *priv = dev_get_drvdata(dev); 52 + 53 + stat->busy_time = 0; 54 + stat->total_time = 0; 55 + stat->current_frequency = clk_get_rate(priv->clk); 56 + 57 + return 0; 58 + } 59 + 60 + static void imx_bus_exit(struct device *dev) 61 + { 62 + struct imx_bus *priv = dev_get_drvdata(dev); 63 + 64 + dev_pm_opp_of_remove_table(dev); 65 + platform_device_unregister(priv->icc_pdev); 66 + } 67 + 68 + /* imx_bus_init_icc() - register matching icc provider if required */ 69 + static int imx_bus_init_icc(struct device *dev) 70 + { 71 + struct imx_bus *priv = dev_get_drvdata(dev); 72 + const char *icc_driver_name; 73 + 74 + if (!of_get_property(dev->of_node, "#interconnect-cells", 0)) 75 + return 0; 76 + if (!IS_ENABLED(CONFIG_INTERCONNECT_IMX)) { 77 + dev_warn(dev, "imx interconnect drivers disabled\n"); 78 + return 0; 79 + } 80 + 81 + icc_driver_name = of_device_get_match_data(dev); 82 + if (!icc_driver_name) { 83 + dev_err(dev, "unknown interconnect driver\n"); 84 + return 0; 85 + } 86 + 87 + priv->icc_pdev = platform_device_register_data( 88 + dev, icc_driver_name, -1, NULL, 0); 89 + if (IS_ERR(priv->icc_pdev)) { 90 + dev_err(dev, "failed to register icc provider %s: %ld\n", 91 + icc_driver_name, PTR_ERR(priv->icc_pdev)); 92 + return PTR_ERR(priv->icc_pdev); 93 + } 94 + 95 + return 0; 96 + } 97 + 98 + static int imx_bus_probe(struct platform_device *pdev) 99 + { 100 + struct device *dev = &pdev->dev; 101 + struct imx_bus *priv; 102 + const char *gov = DEVFREQ_GOV_USERSPACE; 103 + int ret; 104 + 105 + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 106 + if (!priv) 107 + return -ENOMEM; 108 + 109 + /* 110 + * Fetch the clock to adjust but don't explicitly enable. 111 + * 112 + * For imx bus clock clk_set_rate is safe no matter if the clock is on 113 + * or off and some peripheral side-buses might be off unless enabled by 114 + * drivers for devices on those specific buses. 115 + * 116 + * Rate adjustment on a disabled bus clock just takes effect later. 117 + */ 118 + priv->clk = devm_clk_get(dev, NULL); 119 + if (IS_ERR(priv->clk)) { 120 + ret = PTR_ERR(priv->clk); 121 + dev_err(dev, "failed to fetch clk: %d\n", ret); 122 + return ret; 123 + } 124 + platform_set_drvdata(pdev, priv); 125 + 126 + ret = dev_pm_opp_of_add_table(dev); 127 + if (ret < 0) { 128 + dev_err(dev, "failed to get OPP table\n"); 129 + return ret; 130 + } 131 + 132 + priv->profile.polling_ms = 1000; 133 + priv->profile.target = imx_bus_target; 134 + priv->profile.get_dev_status = imx_bus_get_dev_status; 135 + priv->profile.exit = imx_bus_exit; 136 + priv->profile.get_cur_freq = imx_bus_get_cur_freq; 137 + priv->profile.initial_freq = clk_get_rate(priv->clk); 138 + 139 + priv->devfreq = devm_devfreq_add_device(dev, &priv->profile, 140 + gov, NULL); 141 + if (IS_ERR(priv->devfreq)) { 142 + ret = PTR_ERR(priv->devfreq); 143 + dev_err(dev, "failed to add devfreq device: %d\n", ret); 144 + goto err; 145 + } 146 + 147 + ret = imx_bus_init_icc(dev); 148 + if (ret) 149 + goto err; 150 + 151 + return 0; 152 + 153 + err: 154 + dev_pm_opp_of_remove_table(dev); 155 + return ret; 156 + } 157 + 158 + static const struct of_device_id imx_bus_of_match[] = { 159 + { .compatible = "fsl,imx8mq-noc", .data = "imx8mq-interconnect", }, 160 + { .compatible = "fsl,imx8mm-noc", .data = "imx8mm-interconnect", }, 161 + { .compatible = "fsl,imx8mn-noc", .data = "imx8mn-interconnect", }, 162 + { .compatible = "fsl,imx8m-noc", }, 163 + { .compatible = "fsl,imx8m-nic", }, 164 + { /* sentinel */ }, 165 + }; 166 + MODULE_DEVICE_TABLE(of, imx_bus_of_match); 167 + 168 + static struct platform_driver imx_bus_platdrv = { 169 + .probe = imx_bus_probe, 170 + .driver = { 171 + .name = "imx-bus-devfreq", 172 + .of_match_table = of_match_ptr(imx_bus_of_match), 173 + }, 174 + }; 175 + module_platform_driver(imx_bus_platdrv); 176 + 177 + MODULE_DESCRIPTION("Generic i.MX bus frequency scaling driver"); 178 + MODULE_AUTHOR("Leonard Crestez <leonard.crestez@nxp.com>"); 179 + MODULE_LICENSE("GPL v2");
+3 -4
drivers/devfreq/tegra30-devfreq.c
··· 420 420 421 421 static_cpu_emc_freq = actmon_cpu_to_emc_rate(tegra, cpu_freq); 422 422 423 - if (dev_freq >= static_cpu_emc_freq) 423 + if (dev_freq + actmon_dev->boost_freq >= static_cpu_emc_freq) 424 424 return 0; 425 425 426 426 return static_cpu_emc_freq; ··· 807 807 } 808 808 809 809 err = platform_get_irq(pdev, 0); 810 - if (err < 0) { 811 - dev_err(&pdev->dev, "Failed to get IRQ: %d\n", err); 810 + if (err < 0) 812 811 return err; 813 - } 812 + 814 813 tegra->irq = err; 815 814 816 815 irq_set_status_flags(tegra->irq, IRQ_NOAUTOEN);
+1 -3
drivers/powercap/intel_rapl_common.c
··· 26 26 #include <asm/cpu_device_id.h> 27 27 #include <asm/intel-family.h> 28 28 29 - /* Local defines */ 30 - #define MSR_PLATFORM_POWER_LIMIT 0x0000065C 31 - 32 29 /* bitmasks for RAPL MSRs, used by primitive access functions */ 33 30 #define ENERGY_STATUS_MASK 0xffffffff 34 31 ··· 986 989 X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT, &rapl_defaults_core), 987 990 X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_PLUS, &rapl_defaults_core), 988 991 X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_D, &rapl_defaults_core), 992 + X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT, &rapl_defaults_core), 989 993 X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D, &rapl_defaults_core), 990 994 X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_L, &rapl_defaults_core), 991 995
+1 -1
tools/power/cpupower/utils/cpupower-info.c
··· 62 62 default: 63 63 print_wrong_arg_exit(); 64 64 } 65 - }; 65 + } 66 66 67 67 if (!params.params) 68 68 params.params = 0x7;
+1 -1
tools/power/cpupower/utils/cpupower-set.c
··· 72 72 default: 73 73 print_wrong_arg_exit(); 74 74 } 75 - }; 75 + } 76 76 77 77 if (!params.params) 78 78 print_wrong_arg_exit();
+1 -1
tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c
··· 117 117 break; 118 118 default: 119 119 return -1; 120 - }; 120 + } 121 121 return 0; 122 122 } 123 123
+3 -3
tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c
··· 53 53 dprint("CPU %d - State: %d - Val: %llu\n", 54 54 cpu, state, previous_count[cpu][state]); 55 55 } 56 - }; 56 + } 57 57 return 0; 58 58 } 59 59 ··· 72 72 dprint("CPU %d - State: %d - Val: %llu\n", 73 73 cpu, state, previous_count[cpu][state]); 74 74 } 75 - }; 75 + } 76 76 return 0; 77 77 } 78 78 ··· 172 172 cpuidle_cstates[num].id = num; 173 173 cpuidle_cstates[num].get_count_percent = 174 174 cpuidle_get_count_percent; 175 - }; 175 + } 176 176 177 177 /* Free this at program termination */ 178 178 previous_count = malloc(sizeof(long long *) * cpu_count);
+1 -1
tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c
··· 79 79 break; 80 80 default: 81 81 return -1; 82 - }; 82 + } 83 83 if (read_msr(cpu, msr, val)) 84 84 return -1; 85 85 return 0;
+1 -1
tools/power/cpupower/utils/idle_monitor/nhm_idle.c
··· 91 91 break; 92 92 default: 93 93 return -1; 94 - }; 94 + } 95 95 if (read_msr(cpu, msr, val)) 96 96 return -1; 97 97
+1 -1
tools/power/cpupower/utils/idle_monitor/snb_idle.c
··· 77 77 break; 78 78 default: 79 79 return -1; 80 - }; 80 + } 81 81 if (read_msr(cpu, msr, val)) 82 82 return -1; 83 83 return 0;