[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e4730b8c68bea16ac9135293b82828012d2206a7.camel@linux.intel.com>
Date: Thu, 27 Aug 2020 12:52:31 -0700
From: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Doug Smythies <dsmythies@...us.net>,
Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>
Subject: Re: [PATCH v3 0/5] cpufreq: intel_pstate: Address some HWP-related
oddities
On Thu, 2020-08-27 at 17:08 +0200, Rafael J. Wysocki wrote:
> Hi All,
>
> The v3 is here to address feedback from Srinivas and Doug, and Artem
> concerns
> regarding the EPP sysfs interface changes.
>
> The purpose of this series is to address some peculiarities related
> to
> taking CPUs offline/online and switching between different operation
> modes with HWP enabled that have become visible after allowing the
> driver to work in the passive mode with HWP enabled in 5.9-rc1 (and
> one that was there earlier, but can be addressed easily after the
> changes made in 5.9-rc1).
>
> Please refer to the patch changelogs for details.
>
> For easier testing/review, the series is available from the git
> branch at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
> intel_pstate-testing
>
> I've done my best to address all of the possible corner cases, but
> the test
> matrix is quite extensive and I may have missed something, so go
> ahead
> and test.
Unchecked MSR access (attached dmesg) then all HWP settings goes to 0s
except CPU 0 after resume after S3.
Full log of my console (full copy paste)
[labuser@...pl-perf-test-skx-i9 ~]$ sudo -s
[root@...pl-perf-test-skx-i9 labuser]# cd
/sys/devices/system/cpu/intel_pstate/
[root@...pl-perf-test-skx-i9 intel_pstate]# grep . *
hwp_dynamic_boost:0
max_perf_pct:100
min_perf_pct:27
no_turbo:0
num_pstates:32
status:active
turbo_pct:32
[root@...pl-perf-test-skx-i9 intel_pstate]# cd ../cpu0/cpufreq/
[root@...pl-perf-test-skx-i9 cpufreq]# grep . *
affected_cpus:0
base_frequency:3300000
cpuinfo_max_freq:4300000
cpuinfo_min_freq:1200000
cpuinfo_transition_latency:0
energy_performance_available_preferences:default performance
balance_performance balance_power power
energy_performance_preference:balance_performance
related_cpus:0
scaling_available_governors:performance powersave
scaling_cur_freq:1199695
scaling_driver:intel_pstate
scaling_governor:powersave
scaling_max_freq:4300000
scaling_min_freq:1200000
scaling_setspeed:<unsupported>
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -a 0x771
70c212b
70c212b
70c212b
70c212d
70c212b
70c212b
70c212b
70c212b
70c212b
70c212d
70c212b
70c212b
70c212b
70c212d
70c212b
70c212b
70c212b
70c212b
70c212b
70c212d
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -a 0x774
80002b0c
80002b0c
80002b0c
80002d0c
80002b0c
80002b0c
80002b0c
80002b0c
80002b0c
80002d0c
80002b0c
80002b0c
80002b0c
80002d0c
80002b0c
80002b0c
80002b0c
80002b0c
80002b0c
80002d0d
[root@...pl-perf-test-skx-i9 cpufreq]# echo 4000000 > scaling_max_freq
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 0 9x774
rdmsr: CPU 0 cannot read MSR 0x00000009
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 0 0x774
8000280c
[root@...pl-perf-test-skx-i9 cpufreq]# echo 4200000 > scaling_max_freq
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 0 0x774
80002a0c
[root@...pl-perf-test-skx-i9 cpufreq]# echo 4300000 > scaling_max_freq
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 0 0x774
80002b0c
[root@...pl-perf-test-skx-i9 cpufreq]# echo 4000000 > scaling_max_freq
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 0 0x774
8000280c
[root@...pl-perf-test-skx-i9 cpufreq]# echo 127 >
energy_performance_preference
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 0 0x774
7f00280c
[root@...pl-perf-test-skx-i9 cpufreq]# echo 0 > ../../
cpu0/ cpu13/ cpu18/ cpu5/ cpu
freq/ kernel_max online uevent
cpu1/ cpu14/ cpu19/ cpu6/ cpu
idle/ microcode/ possible vulnerabilities/
cpu10/ cpu15/ cpu2/ cpu7/ hot
plug/ modalias power/
cpu11/ cpu16/ cpu3/ cpu8/ int
el_pstate/ nohz_full present
cpu12/ cpu17/ cpu4/ cpu9/ iso
lated offline smt/
[root@...pl-perf-test-skx-i9 cpufreq]# echo 0 > ../
acpi_cppc/ cpuidle/ driver/ microcode/
subsystem/ uevent
cache/ crash_notes firmware_node/ node0/
thermal_throttle/
cpufreq/ crash_notes_size hotplug/ power/
topology/
[root@...pl-perf-test-skx-i9 cpufreq]# echo 128 >
energy_performance_preference
[root@...pl-perf-test-skx-i9 cpufreq]# echo 4300000 > scaling_max_freq
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 0 0x774
80002b0c
[root@...pl-perf-test-skx-i9 cpufreq]# cd ../../cpu1
cpu1/ cpu10/ cpu11/ cpu12/ cpu13/ cpu14/ cpu15/ cpu16/ cpu17/ cpu18/
cpu19/
[root@...pl-perf-test-skx-i9 cpufreq]# cd ../../cpu1
[root@...pl-perf-test-skx-i9 cpu1]# cd cpufreq/
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 0 0x774
80002b0c
[root@...pl-perf-test-skx-i9 cpufreq]# echo 127 >
energy_performance_preference
[root@...pl-perf-test-skx-i9 cpufreq]# echo 4000000 > scaling_max_freq
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 0 0x774
80002b0c
[root@...pl-perf-test-skx-i9 cpufreq]# cat scaling_max_freq
4000000
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 1 0x774
7f00280c
[root@...pl-perf-test-skx-i9 cpufreq]# echo 0 > ../online
bash: ../online: Permission denied
[root@...pl-perf-test-skx-i9 cpufreq]# echo 0 > ../online
affected_cpus energy_performance_available_
preferences scaling_driver
base_frequency energy_performance_preference
scaling_governor
cpuinfo_max_freq related_cpus
scaling_max_freq
cpuinfo_min_freq scaling_available_governors
scaling_min_freq
cpuinfo_transition_latency scaling_cur_freq
scaling_setspeed
[root@...pl-perf-test-skx-i9 cpufreq]# cat ../
cat: ../: Is a directory
[root@...pl-perf-test-skx-i9 cpufreq]# cat ../online
cat: ../online: No such file or directory
[root@...pl-perf-test-skx-i9 cpufreq]# ls ../../
cpu0 cpu11 cpu14 cpu17 cpu2 cpu5 cpu8 cpuidle isolated
modalias online present vulnerabilities
cpu1 cpu12 cpu15 cpu18 cpu3 cpu6 cpu9 hotplug kernel_m
ax nohz_full possible smt
cpu10 cpu13 cpu16 cpu19 cpu4 cpu7 cpufreq intel_pstate microcod
e offline power uevent
[root@...pl-perf-test-skx-i9 cpufreq]# echo 0 > ../../cpu1
cpu1/ cpu10/ cpu11/ cpu12/ cpu13/ cpu14/ cpu15/ cpu16/ cpu17/ cpu18/
cpu19/
[root@...pl-perf-test-skx-i9 cpufreq]# echo 0 > ../../cpu1/online
[root@...pl-perf-test-skx-i9 cpufreq]# echo 1 > ../../cpu1/online
[root@...pl-perf-test-skx-i9 cpufreq]# dmesg | tail
[ 626.188805] intel_pstate: CPU 1 stopping
[ 626.188808] intel_pstate: CPU 1 going offline
[ 626.205589] smpboot: CPU 1 is now offline
[ 633.671812] x86: Booting SMP configuration:
[ 633.671815] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 633.677208] intel_pstate: CPU 1 going online
[ 633.677253] intel_pstate: set_policy cpuinfo.max 4300000 policy->max
4000000
[ 633.677259] intel_pstate: cpu:1 max_state 43 min_policy_perf:12
max_policy_perf:40
[ 633.677260] intel_pstate: cpu:1 global_min:12 global_max:43
[ 633.677262] intel_pstate: cpu:1 max_perf_ratio:40 min_perf_ratio:12
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 1 0x774
7f00280c
[root@...pl-perf-test-skx-i9 cpufreq]# rtcwake -m mem -s 10
rtcwake: wakeup from "mem" using /dev/rtc0 at Thu Aug 27 19:42:51 2020
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -p 1 0x774
0
[root@...pl-perf-test-skx-i9 cpufreq]# grep . *
affected_cpus:1
base_frequency:3300000
cpuinfo_max_freq:4300000
cpuinfo_min_freq:1200000
cpuinfo_transition_latency:0
energy_performance_available_preferences:default performance
balance_performance balance_power power
energy_performance_preference:performance
related_cpus:1
scaling_available_governors:performance powersave
scaling_cur_freq:699896
scaling_driver:intel_pstate
scaling_governor:powersave
scaling_max_freq:4000000
scaling_min_freq:1200000
scaling_setspeed:<unsupported>
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -a 0x774
80002b0c
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
[root@...pl-perf-test-skx-i9 cpufreq]# dmesg > /tmp/dmesg.txt
[root@...pl-perf-test-skx-i9 cpufreq]# vi /tmp/dmesg.txt
[root@...pl-perf-test-skx-i9 cpufreq]# rdmsr -a 0x774
80002b0c
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
[root@...pl-perf-test-skx-i9 cpufreq]#
Thanks,
Srinivas
>
> Thanks,
> Rafael
>
>
>
View attachment "dmesg_08_27.txt" of type "text/plain" (118159 bytes)
Powered by blists - more mailing lists