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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm-6.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
"Update cpufreq documentation to match the code after recent changes
(Christian Loehle), fix a units conversion issue in the CPPC cpufreq
driver (liwei), and fix an error check in the dtpm_devfreq power
capping driver (Yuan Can)"

* tag 'pm-6.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: CPPC: fix perf_to_khz/khz_to_perf conversion exception
powercap: dtpm_devfreq: Fix error check against dev_pm_qos_add_request()
cpufreq: docs: Reflect latency changes in docs

+28 -16
+10 -10
Documentation/admin-guide/pm/cpufreq.rst
··· 425 425 426 426 ``rate_limit_us`` 427 427 Minimum time (in microseconds) that has to pass between two consecutive 428 - runs of governor computations (default: 1000 times the scaling driver's 429 - transition latency). 428 + runs of governor computations (default: 1.5 times the scaling driver's 429 + transition latency or the maximum 2ms). 430 430 431 431 The purpose of this tunable is to reduce the scheduler context overhead 432 432 of the governor which might be excessive without it. ··· 474 474 This is how often the governor's worker routine should run, in 475 475 microseconds. 476 476 477 - Typically, it is set to values of the order of 10000 (10 ms). Its 478 - default value is equal to the value of ``cpuinfo_transition_latency`` 479 - for each policy this governor is attached to (but since the unit here 480 - is greater by 1000, this means that the time represented by 481 - ``sampling_rate`` is 1000 times greater than the transition latency by 482 - default). 477 + Typically, it is set to values of the order of 2000 (2 ms). Its 478 + default value is to add a 50% breathing room 479 + to ``cpuinfo_transition_latency`` on each policy this governor is 480 + attached to. The minimum is typically the length of two scheduler 481 + ticks. 483 482 484 483 If this tunable is per-policy, the following shell command sets the time 485 - represented by it to be 750 times as high as the transition latency:: 484 + represented by it to be 1.5 times as high as the transition latency 485 + (the default):: 486 486 487 - # echo `$(($(cat cpuinfo_transition_latency) * 750 / 1000)) > ondemand/sampling_rate 487 + # echo `$(($(cat cpuinfo_transition_latency) * 3 / 2)) > ondemand/sampling_rate 488 488 489 489 ``up_threshold`` 490 490 If the estimated CPU load is above this value (in percent), the governor
+17 -5
drivers/acpi/cppc_acpi.c
··· 1916 1916 u64 mul, div; 1917 1917 1918 1918 if (caps->lowest_freq && caps->nominal_freq) { 1919 - mul = caps->nominal_freq - caps->lowest_freq; 1919 + /* Avoid special case when nominal_freq is equal to lowest_freq */ 1920 + if (caps->lowest_freq == caps->nominal_freq) { 1921 + mul = caps->nominal_freq; 1922 + div = caps->nominal_perf; 1923 + } else { 1924 + mul = caps->nominal_freq - caps->lowest_freq; 1925 + div = caps->nominal_perf - caps->lowest_perf; 1926 + } 1920 1927 mul *= KHZ_PER_MHZ; 1921 - div = caps->nominal_perf - caps->lowest_perf; 1922 1928 offset = caps->nominal_freq * KHZ_PER_MHZ - 1923 1929 div64_u64(caps->nominal_perf * mul, div); 1924 1930 } else { ··· 1945 1939 { 1946 1940 s64 retval, offset = 0; 1947 1941 static u64 max_khz; 1948 - u64 mul, div; 1942 + u64 mul, div; 1949 1943 1950 1944 if (caps->lowest_freq && caps->nominal_freq) { 1951 - mul = caps->nominal_perf - caps->lowest_perf; 1952 - div = caps->nominal_freq - caps->lowest_freq; 1945 + /* Avoid special case when nominal_freq is equal to lowest_freq */ 1946 + if (caps->lowest_freq == caps->nominal_freq) { 1947 + mul = caps->nominal_perf; 1948 + div = caps->nominal_freq; 1949 + } else { 1950 + mul = caps->nominal_perf - caps->lowest_perf; 1951 + div = caps->nominal_freq - caps->lowest_freq; 1952 + } 1953 1953 /* 1954 1954 * We don't need to convert to kHz for computing offset and can 1955 1955 * directly use nominal_freq and lowest_freq as the div64_u64
+1 -1
drivers/powercap/dtpm_devfreq.c
··· 178 178 ret = dev_pm_qos_add_request(dev, &dtpm_devfreq->qos_req, 179 179 DEV_PM_QOS_MAX_FREQUENCY, 180 180 PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE); 181 - if (ret) { 181 + if (ret < 0) { 182 182 pr_err("Failed to add QoS request: %d\n", ret); 183 183 goto out_dtpm_unregister; 184 184 }