About AMD CPU frequency

Hi!
CPU frequency in Windows and Linux is changing depending on task from 900MHz to 2.8GHz. but in FreeBSD can't see it.
Without powerd frequency not changed (always is 1.4GHz) and with powerd enabled changing in 3 steps: 1000, 1200 and 1400
My CPU is AMD Athlon Silver 3050e with 2 cores and 4 threads. the maximum frequency is 1.4GHz and boost frequency 2.8GHz.

some information from FreeBSD:

Code:
genesis:~:% sysctl dev.cpu
dev.cpu.3.cx_method: C1/hlt C2/io
dev.cpu.3.cx_usage_counters: 625766 631486
dev.cpu.3.cx_usage: 49.77% 50.22% last 213us
dev.cpu.3.cx_lowest: C8
dev.cpu.3.cx_supported: C1/1/1 C2/2/400
dev.cpu.3.%parent: acpi0
dev.cpu.3.%pnpinfo: _HID=none _UID=0 _CID=none
dev.cpu.3.%location: handle=\_PR_.C003
dev.cpu.3.%driver: cpu
dev.cpu.3.%desc: ACPI CPU
dev.cpu.2.cx_method: C1/hlt C2/io
dev.cpu.2.cx_usage_counters: 5340580 182
dev.cpu.2.cx_usage: 99.99% 0.00% last 126us
dev.cpu.2.cx_lowest: C8
dev.cpu.2.cx_supported: C1/1/1 C2/2/400
dev.cpu.2.%parent: acpi0
dev.cpu.2.%pnpinfo: _HID=none _UID=0 _CID=none
dev.cpu.2.%location: handle=\_PR_.C002
dev.cpu.2.%driver: cpu
dev.cpu.2.%desc: ACPI CPU
dev.cpu.1.cx_method: C1/hlt C2/io
dev.cpu.1.cx_usage_counters: 481329 637659
dev.cpu.1.cx_usage: 43.01% 56.98% last 1510us
dev.cpu.1.cx_lowest: C8
dev.cpu.1.cx_supported: C1/1/1 C2/2/400
dev.cpu.1.%parent: acpi0
dev.cpu.1.%pnpinfo: _HID=none _UID=0 _CID=none
dev.cpu.1.%location: handle=\_PR_.C001
dev.cpu.1.%driver: cpu
dev.cpu.1.%desc: ACPI CPU
dev.cpu.0.cx_method: C1/hlt C2/io
dev.cpu.0.cx_usage_counters: 850418 759113
dev.cpu.0.cx_usage: 52.83% 47.16% last 61us
dev.cpu.0.cx_lowest: C8
dev.cpu.0.cx_supported: C1/1/1 C2/2/400
dev.cpu.0.freq_levels: 1400/1706 1200/1140 1000/912
dev.cpu.0.freq: 1400
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none _UID=0 _CID=none
dev.cpu.0.%location: handle=\_PR_.C000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU
dev.cpu.%parent:

Code:
genesis~:% sysctl dev.hwpstate
dev.hwpstate.0.freq_settings: 1400/1706 1200/1140 1000/912
dev.hwpstate.0.%parent: cpu0
dev.hwpstate.0.%pnpinfo:
dev.hwpstate.0.%location:
dev.hwpstate.0.%driver: hwpstate
dev.hwpstate.0.%desc: Cool`n'Quiet 2.0
dev.hwpstate.%parent:

Please tell me about AMD CPU Frequency Control in FreeBSD.
 
Please tell me about AMD CPU Frequency Control in FreeBSD.
Probably, to take advantage of your CPU's frequency range, you don't need to specify any settings explicitly.

I had the same confusion about used CPU frequencies of my systems AMD Ryzen 7 5700U (1800 GHz, Max Boost 4.3 GHz).
Code:
dev.hwpstate.0.freq_settings: 1800/2193 1700/1615 1400/1277
dev.cpu.0.freq_levels: 1800/2193 1700/1615 1400/1277
dev.cpu.0.freq: 1800

I thought (mistakenly) the frequency was limited to no more than "1800", but after been questioned of my conclusion by a fellow forums user, it turns out, the CPU is using all available frequencies, no intervention needed.

Run following test:
Code:
# kldload pmc
# pmcstat -s unhalted-core-cycles -w 1 2>&1 | sed -E -e 1d -e 's/ {15}/ /g'

second terminal:

% yes > /dev/null

- https://forums.freebsd.org/threads/lenovo-thinkpad-amd-versus-intel.86912/post-586449

Or

Code:
 # cpuset -l 2 stress -c 3 -t 120s &
then in foreground
# pmcstat -s unhalted-core-cycles -w 1
(needs sysutils/stress installed)

- https://forums.freebsd.org/threads/lenovo-thinkpad-amd-versus-intel.86912/post-586835
 
Back
Top