[Bug 289387] sysctl values dev.cpu.N.cx_usage are at 100% while CPUs are mostly idle

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 08 Sep 2025 19:22:32 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289387

Steve King <staffer.parry.0e@icloud.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |staffer.parry.0e@icloud.com

--- Comment #1 from Steve King <staffer.parry.0e@icloud.com> ---
AIUI cx_usage is the amount of time a cpu spends in a given C state, you seem
to only have one C state active therefore the cpu spends 100% of its time in
it.

So not directly related to CPU load as shown by top.

Have you got performance_cx_lowest="Cmax" set in rc.conf.

This the out from my cpu:

$ sysctl -a | grep cx_
hw.acpi.cpu.cx_lowest: C8
dev.cpu.3.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.3.cx_usage_counters: 67455451 94463362 175741864
dev.cpu.3.cx_usage: 19.97% 27.97% 52.04% last 29us
dev.cpu.3.cx_lowest: C8
dev.cpu.3.cx_supported: C1/1/1 C2/2/253 C3/3/1048
dev.cpu.2.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.2.cx_usage_counters: 65856084 90971269 171281055
dev.cpu.2.cx_usage: 20.07% 27.72% 52.20% last 779us
dev.cpu.2.cx_lowest: C8
dev.cpu.2.cx_supported: C1/1/1 C2/2/253 C3/3/1048
dev.cpu.1.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.1.cx_usage_counters: 65724627 90757058 170987417
dev.cpu.1.cx_usage: 20.07% 27.71% 52.21% last 4us
dev.cpu.1.cx_lowest: C8
dev.cpu.1.cx_supported: C1/1/1 C2/2/253 C3/3/1048
dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.0.cx_usage_counters: 65670120 89806406 173626997
dev.cpu.0.cx_usage: 19.95% 27.28% 52.75% last 2385us
dev.cpu.0.cx_lowest: C8
dev.cpu.0.cx_supported: C1/1/1 C2/2/253 C3/3/1048

As you can see I have 3 active states C1,c2,C3.

Note the cpu manages the c states itself.

-- 
You are receiving this mail because:
You are the assignee for the bug.