@@ -175,353 +175,19 @@ to collect and save emulation data from a real system. The emulation data should
175175
176176## P-states
177177
178- The ` pepc pstates ` command groups operations related to CPU performance states (P-states). For
179- example, it supports reading and changing CPU frequency limits.
180-
181- If you are new to Intel CPU P-states, the [ Intel CPU Base Frequency
182- Explained] ( misc-cpu-base-freq.md ) article explains many concepts related to CPU performance scaling.
183-
184- ### Examples
185-
186- ** Get all P-states Information**
187-
188- Here is an example of running ` pepc pstates info ` on a 2-socket Granite Rapids system.
189-
190- ``` bash
191- $ pepc pstates info
192- Source: Linux sysfs file-system
193- - Turbo: on
194- - Min. CPU frequency: 800.00MHz for all CPUs
195- - Max. CPU frequency: 3.90GHz for all CPUs
196- - Min. supported CPU frequency: 800.00MHz for all CPUs
197- - Max. supported CPU frequency: 3.90GHz for all CPUs
198- - CPU base frequency: 2.00GHz for all CPUs
199- - EPP: ' balance_performance' for all CPUs
200- - EPB: 6 for all CPUs
201- - CPU frequency driver: intel_pstate
202- - Mode of ' intel_pstate' driver: active
203- - CPU frequency governor: ' powersave' for all CPUs
204- - Available CPU frequency governors: performance, powersave
205- - ACPI CPPC lowest performance level: 5 for all CPUs
206- - ACPI CPPC lowest nonlinear performance level: 8 for all CPUs
207- - ACPI CPPC guaranteed performance level: 20 for all CPUs
208- - ACPI CPPC nominal performance level: 20 for all CPUs
209- - ACPI CPPC highest performance level: 39 for all CPUs
210- Source: Model Specific Register (MSR)
211- - Fixed CPU base frequency: 2.00GHz
212- - Hardware power management: on
213- - HWP lowest performance level: 5 for all CPUs
214- - HWP most efficient performance level: 8 for all CPUs
215- - HWP guaranteed performance level: 20 for all CPUs
216- - HWP highest performance level: 39 for all CPUs
217- Source: Hardware documentation
218- - Bus clock speed: 100.00MHz
219- ```
220-
221- ** Get CPU Base Frequency**
222-
223- Here are 2 commands for getting the fixed and sysfs CPU base frequency on a Raptor Lake system.
224-
225- ``` bash
226- # Fixed CPU base frequency
227- $ pepc pstates info --fixed-base-freq
228- Fixed CPU base frequency: 2.20GHz
229- # Sysfs CPU base frequency
230- $ pepc pstates info --base-freq
231- CPU base frequency: 1.90GHz for CPUs 0-7 (P-cores)
232- CPU base frequency: 1.40GHz for CPUs 8-15 (E-cores)
233- ```
234-
235- ** Set Min. and Max. CPU Frequency for E-cores**
236-
237- Here is how to limit CPU frequency range to [ 1.5GHz, 2GHz] for E-cores on a Raptor Lake system.
238-
239- First, find out what CPUs are E-cores using the ` pepc topology info ` command.
240-
241- ``` bash
242- $ pepc topology info
243- CPU Core Module Node Package Hybrid
244- 0 0 0 0 0 P-core
245- 1 0 0 0 0 P-core
246- 2 4 1 0 0 P-core
247- 3 4 1 0 0 P-core
248- 4 8 2 0 0 P-core
249- 5 8 2 0 0 P-core
250- 6 12 3 0 0 P-core
251- 7 12 3 0 0 P-core
252- 8 16 4 0 0 E-core
253- 9 17 4 0 0 E-core
254- 10 18 4 0 0 E-core
255- 11 19 4 0 0 E-core
256- 12 20 5 0 0 E-core
257- 13 21 5 0 0 E-core
258- 14 22 5 0 0 E-core
259- 15 23 5 0 0 E-core
260- ```
261-
262- E-cores are CPUs 8-15. Now set the min. and max. CPU frequency for these CPUs.
263-
264- ``` bash
265- $ pepc pstates config --min-freq 1.5GHz --max-freq 2GHz --cpus 8-15
266- Min. CPU frequency: set to 1.50GHz for CPUs 8-15 (E-cores)
267- Max. CPU frequency: set to 2.00GHz for CPUs 8-15 (E-cores)
268- ```
269-
270- Verify it.
271-
272- ``` bash
273- $ pepc pstates info --min-freq --max-freq
274- Min. CPU frequency: 400.00MHz for CPUs 0-7 (P-cores)
275- Min. CPU frequency: 1.50GHz for CPUs 8-15 (E-cores)
276- Max. CPU frequency: 4.60GHz for CPUs 0-7 (P-cores)
277- Max. CPU frequency: 2.00GHz for CPUs 8-15 (E-cores)
278- ```
279-
280- ** Lock CPU Frequency to Base Frequency**
281-
282- Lock CPU frequency to sysfs base frequency (HFM) for all CPUs in package 1 on a 2-socket Granite
283- Rapids system.
284-
285- ``` bash
286- $ pepc pstates config --min-freq base --max-freq base --packages 1
287- Min. CPU frequency: set to 2.00GHz for CPUs 128-255,384-511 (package 1)
288- Max. CPU frequency: set to 2.00GHz for CPUs 128-255,384-511 (package 1)
289- ```
290-
291- ** Note:** You do not have to specify the exact base frequency value. You can simply use the 'base'
292- keyword, and ` pepc ` will figure out the correct value itself.
293-
294- ** Unlock CPU Frequency**
295-
296- Unlock CPU frequency for all CPUs on a Raptor Lake system by setting min. and max. CPU frequency to
297- the supported minimum and maximum frequency.
298-
299- ``` bash
300- $ pepc pstates config --min-freq min --max-freq max
301- Min. CPU frequency: set to 1.2GHz for CPUs 0-87 (all CPUs)
302- Max. CPU frequency: set to 3.6GHz for CPUs 0-87 (all CPUs)
303- ```
304-
305- ** Change Linux CPU Frequency Governor**
306-
307- First, get the name of current governor and list of supported governors.
308-
309- ``` bash
310- $ pepc pstates info --governor --governors
311- CPU frequency governor: ' schedutil' for CPUs 0-87 (all CPUs)
312- Available CPU frequency governors: conservative, ondemand, userspace, powersave, performance, schedutil
313- ```
314-
315- Switch to the 'performance' governor.
316-
317- ``` bash
318- $ pepc pstates config --governor performance
319- CPU frequency governor: set to ' performance' for CPUs 0-87 (all CPUs)
320- ```
321-
322- Verify it.
323-
324- ``` bash
325- $ pepc pstates info --governor
326- CPU frequency governor: ' performance' for CPUs 0-87 (all CPUs)
327- ```
178+ The ` pepc pstates ` command groups operations related to CPU performance states (P-states). This
179+ command is covered in a separate document: [ Pepc User Guide: P-states] ( guide-pstates.md ) .
328180
329181## C-states
330182
331- The ` pepc cstates ` command groups operations related to CPU idle states (C-states). For
332- example, it supports enabling or disabling requestable Linux C-states or toggling the CPU "C1
333- demotion" feature.
334-
335- If you are new to Linux and Intel CPU C-states, the following articles available in the ` pepc ` repository
336- may be helpful:
337- - [ Intel C-state namespaces] ( misc-cstate-namespaces.md ) - explains C-state naming conventions.
338- - [ Xeon C6P and C6SP Idle States] ( misc-c6p-c6sp.md ) - explains the C6P and C6SP idle states on
339- Intel Xeon platforms.
340-
341- ### Examples
342-
343- ** Get all C-states Information**
344-
345- ``` bash
346- $ pepc cstates info
347- Source: Linux sysfs file-system
348- - POLL: ' on' for CPUs 0-87 (all CPUs)
349- - description: CPUIDLE CORE POLL IDLE
350- - expected latency: 0 us
351- - target residency: 0 us
352- - C1: ' on' for CPUs 0-87 (all CPUs)
353- - description: MWAIT 0x00
354- - expected latency: 2 us
355- - target residency: 2 us
356- - C1E: ' on' for CPUs 0-87 (all CPUs)
357- - description: MWAIT 0x01
358- - expected latency: 10 us
359- - target residency: 20 us
360- - C3: ' off' for CPUs 0-87 (all CPUs)
361- - description: MWAIT 0x10
362- - expected latency: 40 us
363- - target residency: 100 us
364- - C6: ' on' for CPUs 0-87 (all CPUs)
365- - description: MWAIT 0x20
366- - expected latency: 133 us
367- - target residency: 400 us
368- Source: Model Specific Register (MSR)
369- - Package C-state limit: ' PC6' for CPUs 0-87 (all CPUs)
370- - Package C-state limit lock: ' on' for CPUs 0-87 (all CPUs)
371- - Available package C-state limits: PC0, PC2, PC3, PC6, unlimited
372- - C1 demotion: ' off' for CPUs 0-87 (all CPUs)
373- - C1 undemotion: ' off' for CPUs 0-87 (all CPUs)
374- - C1E autopromote: ' off' for CPUs 0-87 (all CPUs)
375- - C-state prewake: ' on' for CPUs 0-87 (all CPUs)
376- Source: Linux sysfs file-system
377- - Idle driver: intel_idle
378- - Idle governor: ' menu' for CPUs 0-87 (all CPUs)
379- - Available idle governors: menu
380- ```
381-
382- ** Get information about C1, C1E autopromote, and C1 demotion**
383-
384- ``` bash
385- $ pepc cstates info --cstates C1 --c1e-autopromote --c1-demotion
386- C1: ' on' for CPUs 0-87 (all CPUs)
387- - description: MWAIT 0x00
388- - expected latency: 2 us
389- - target residency: 2 us
390- C1E autopromote: ' off' for CPUs 0-87 (all CPUs)
391- C1 demotion: ' off' for CPUs 0-87 (all CPUs)
392- ```
393-
394- ** Toggle C-states**
395-
396- Disable all C-states except POLL on all CPUs.
397-
398- ``` bash
399- $ pepc cstates config --disable all --enable POLL
400- POLL: set to ' off' for CPUs 0-87 (all CPUs)
401- C1: set to ' off' for CPUs 0-87 (all CPUs)
402- C1E: set to ' off' for CPUs 0-87 (all CPUs)
403- C3: set to ' off' for CPUs 0-87 (all CPUs)
404- C6: set to ' off' for CPUs 0-87 (all CPUs)
405- POLL: set to ' on' for CPUs 0-87 (all CPUs)
406- ```
407-
408- Re-enable all C-states on all CPUs.
409-
410- ``` bash
411- $ pepc cstates config --enable all
412- POLL: set to ' on' for CPUs 0-87 (all CPUs)
413- C1: set to ' on' for CPUs 0-87 (all CPUs)
414- C1E: set to ' on' for CPUs 0-87 (all CPUs)
415- C3: set to ' on' for CPUs 0-87 (all CPUs)
416- C6: set to ' on' for CPUs 0-87 (all CPUs)
417- ```
418-
419- Disable C1E and C6 on package 1.
420-
421- ``` bash
422- $ pepc cstates config --disable C1E,C6 --packages 1
423- C1E: set to ' off' for CPUs 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87 (package 1)
424- C6: set to ' off' for CPUs 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87 (package 1)
425- ```
426-
427- ** Configure package C-state limit**
428-
429- Get package C-state limit information.
430-
431- ``` bash
432- $ pepc cstates info --pkg-cstate-limit
433- Package C-state limit: ' PC6' for CPUs 0-87 (all CPUs)
434- Package C-state limit lock: ' off' for CPUs 0-87 (all CPUs)
435- Available package C-state limits: PC0, PC2, PC3, PC6, unlimited
436- ```
437-
438- Since package C-state limit MSR is not locked, we can modify the limit. Set the deepest
439- allowed package C-state to PC0 on all packages.
440-
441- ``` bash
442- $ pepc cstates config --pkg-cstate-limit PC0 --packages all
443- Package C-state limit set to ' PC0' for CPUs 0-87 (all CPUs)
444- ```
183+ The ` pepc cstates ` command groups operations related to CPU idle states (C-states). This command is
184+ covered in a separate document: [ Pepc User Guide: C-states] ( guide-cstates.md ) .
445185
446186## Uncore
447187
448188The ` pepc uncore ` command groups operations related to CPU uncore, for example reading or changing
449- uncore frequency limits.
450-
451- "Uncore" is an informal term referring to the Intel CPU north complex blocks excluding the cores. For
452- example, it typically includes components like the last level cache (LLC), memory controller, and
453- north complex interconnects (e.g., between cores).
454-
455- Some concepts related to uncore frequency scaling and the ELC (Efficiency Latency Control) feature
456- are explained in [ Uncore ELC and Frequency Scaling] ( misc-uncore-elc.md ) .
457-
458- ### Uncore Frequency and Dies
459-
460- In pepc, a "die" is considered to be a unit of uncore frequency scaling. In other words, uncore
461- frequency is per-die.
462-
463- Dies that include CPU cores are referred to as compute dies. Some Intel CPUs enumerate compute dies
464- via the ` CPUID ` instruction, and Linux exposes this information via sysfs (e.g.,
465- '/sys/devices/system/cpu/cpu179/topology/die_cpus_list'). Some Intel CPUs do not enumerate
466- compute dies via ` CPUID ` , so Linux does not expose any die-related information in sysfs. In such
467- cases, ` pepc ` uses platform-specific methods to figure out the die topology. For example, on
468- Granite Rapids Xeon, ` pepc ` uses MSR 0x54 (` MSR_PM_LOGICAL_ID ` ) to figure out which CPUs belong to
469- which compute die.
470-
471- Some dies do not include CPUs, but still have uncore frequency scaling capability. For example,
472- on Granite Rapids Xeon there are "I/O dies" that include uncore blocks related to PCIe and
473- CXL. Such dies cannot be discovered via ` CPUID ` or sysfs, so ` pepc ` uses the TPMI mechanism to
474- enumerate non-compute dies and assign them unique die IDs.
475-
476- Typically client CPUs (e.g., Raptor Lake, Alder Lake) have a single compute die and no non-compute
477- dies. Many server CPUs (e.g., Ice Lake Xeon, Sapphire Rapids Xeon) have only a single compute die
478- and no non-compute dies as well. Some server CPUs (e.g., Cascade Lake-AP) have multiple compute dies
479- and no non-compute dies. Finally, newer server CPUs (e.g., Granite Rapids Xeon and Sierra Forest
480- Xeon) may have multiple compute dies and multiple non-compute dies.
481-
482- Use ` pepc topology info ` to discover die topology on your system. Refer to the
483- [ CPU Topology] ( #cpu-topology ) section for examples, including how to discover non-compute dies.
484-
485- ### Examples
486-
487- ** Get All Uncore Information**
488-
489- Here is an example of running ` pepc uncore info ` on a Granite Rapids system.
490-
491- ``` bash
492- $ pepc uncore info
493- Source: Linux sysfs file-system
494- - Min. uncore frequency: 800.00MHz for all dies in all packages
495- - Max. uncore frequency: 2.20GHz for dies 0-2 in package 0, dies 0-2 in package 1
496- - Max. uncore frequency: 2.50GHz for dies 3,4 in package 0, dies 3,4 in package 1
497- - Min. supported uncore frequency: 800.00MHz for all dies in all packages
498- - Max. supported uncore frequency: 2.20GHz for dies 0-2 in package 0, dies 0-2 in package 1
499- - Max. supported uncore frequency: 2.50GHz for dies 3,4 in package 0, dies 3,4 in package 1
500- - ELC low zone min. uncore frequency: 1.20GHz for dies 0-2 in package 0, dies 0-2 in package 1
501- - ELC low zone min. uncore frequency: 800.00MHz for dies 3,4 in package 0, dies 3,4 in package 1
502- - ELC low threshold: 11% for all dies in all packages
503- - ELC high threshold: 95% for all dies in all packages
504- - ELC high threshold status: ' on' for all dies in all packages
505- ` ` `
506-
507- Notice that compute dies (0-2) and I/O dies (3,4) have different maximum uncore frequencies.
508-
509- The Raptor Lake client system has only one compute die and no non-compute dies, and it does not
510- support ELC.
511-
512- ` ` ` bash
513- $ pepc uncore info
514- Source: Linux sysfs file-system
515- - Min. uncore frequency: 400.00MHz for all CPUs
516- - Max. uncore frequency: 4.00GHz for all CPUs
517- - Min. supported uncore frequency: 400.00MHz for all CPUs
518- - Max. supported uncore frequency: 4.00GHz for all CPUs
519- ` ` `
520-
521- ** Additional Examples**
522-
523- For more examples related to uncore frequency scaling and ELC configuration, refer to
524- the [Uncore ELC and Frequency Scaling](misc-uncore-elc.md) article.
189+ uncore performance scaling settings. This command is covered in a separate document:
190+ [ Pepc User Guide: Uncore] ( guide-uncore.md ) .
525191
526192## CPU Hotplug
527193
0 commit comments