0001 .. SPDX-License-Identifier: GPL-2.0
0002 .. include:: <isonum.txt>
0003
0004 ==============================
0005 Intel Uncore Frequency Scaling
0006 ==============================
0007
0008 :Copyright: |copy| 2022 Intel Corporation
0009
0010 :Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
0011
0012 Introduction
0013 ------------
0014
0015 The uncore can consume significant amount of power in Intel's Xeon servers based
0016 on the workload characteristics. To optimize the total power and improve overall
0017 performance, SoCs have internal algorithms for scaling uncore frequency. These
0018 algorithms monitor workload usage of uncore and set a desirable frequency.
0019
0020 It is possible that users have different expectations of uncore performance and
0021 want to have control over it. The objective is similar to allowing users to set
0022 the scaling min/max frequencies via cpufreq sysfs to improve CPU performance.
0023 Users may have some latency sensitive workloads where they do not want any
0024 change to uncore frequency. Also, users may have workloads which require
0025 different core and uncore performance at distinct phases and they may want to
0026 use both cpufreq and the uncore scaling interface to distribute power and
0027 improve overall performance.
0028
0029 Sysfs Interface
0030 ---------------
0031
0032 To control uncore frequency, a sysfs interface is provided in the directory:
0033 `/sys/devices/system/cpu/intel_uncore_frequency/`.
0034
0035 There is one directory for each package and die combination as the scope of
0036 uncore scaling control is per die in multiple die/package SoCs or per
0037 package for single die per package SoCs. The name represents the
0038 scope of control. For example: 'package_00_die_00' is for package id 0 and
0039 die 0.
0040
0041 Each package_*_die_* contains the following attributes:
0042
0043 ``initial_max_freq_khz``
0044 Out of reset, this attribute represent the maximum possible frequency.
0045 This is a read-only attribute. If users adjust max_freq_khz,
0046 they can always go back to maximum using the value from this attribute.
0047
0048 ``initial_min_freq_khz``
0049 Out of reset, this attribute represent the minimum possible frequency.
0050 This is a read-only attribute. If users adjust min_freq_khz,
0051 they can always go back to minimum using the value from this attribute.
0052
0053 ``max_freq_khz``
0054 This attribute is used to set the maximum uncore frequency.
0055
0056 ``min_freq_khz``
0057 This attribute is used to set the minimum uncore frequency.
0058
0059 ``current_freq_khz``
0060 This attribute is used to get the current uncore frequency.