Created attachment 101061 [details] config.gz I am missing /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state after switching from 3.8 to 3.9. CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_GOV_COMMON=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_STAT_DETAILS=y # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set # CONFIG_CPU_FREQ_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set CONFIG_X86_PCC_CPUFREQ=y CONFIG_X86_ACPI_CPUFREQ=y # CONFIG_X86_ACPI_CPUFREQ_CPB is not set # # x86 CPU frequency scaling drivers # CONFIG_X86_INTEL_PSTATE=y CONFIG_X86_PCC_CPUFREQ=y CONFIG_X86_ACPI_CPUFREQ=y # CONFIG_X86_ACPI_CPUFREQ_CPB is not set # CONFIG_X86_POWERNOW_K8 is not set # CONFIG_X86_SPEEDSTEP_CENTRINO is not set # CONFIG_X86_P4_CLOCKMOD is not set
On Fri, May 10, 2013 at 5:37 PM, <bugzilla-daemon@bugzilla.kernel.org> wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=57941 > > Summary: Cpufreq stats are not shown in sysfs > Product: Power Management > Version: 2.5 > Kernel Version: 3.9 > Platform: All > OS/Version: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: cpufreq > AssignedTo: cpufreq@vger.kernel.org > ReportedBy: jlec@gentoo.org > Regression: Yes > > > Created an attachment (id=101061) > --> (https://bugzilla.kernel.org/attachment.cgi?id=101061) > config.gz > > I am missing /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state after > switching from 3.8 to 3.9. Only this one is missing or complete stats directory?
(In reply to comment #1) > Only this one is missing or complete stats directory? You are right. The complete directory is missing. # ll /sys/devices/system/cpu/cpu0/cpufreq/ total 0 -r--r--r-- 1 root root 4.0K May 12 18:16 affected_cpus -r-------- 1 root root 4.0K May 12 18:16 cpuinfo_cur_freq -r--r--r-- 1 root root 4.0K May 12 11:26 cpuinfo_max_freq -r--r--r-- 1 root root 4.0K May 12 11:26 cpuinfo_min_freq -r--r--r-- 1 root root 4.0K May 12 18:16 cpuinfo_transition_latency -r--r--r-- 1 root root 4.0K May 12 18:16 related_cpus -r--r--r-- 1 root root 4.0K May 12 18:16 scaling_available_governors -r--r--r-- 1 root root 4.0K May 12 18:16 scaling_driver -rw-r--r-- 1 root root 4.0K May 12 18:16 scaling_governor -rw-r--r-- 1 root root 4.0K May 12 11:26 scaling_max_freq -rw-r--r-- 1 root root 4.0K May 12 18:16 scaling_min_freq -rw-r--r-- 1 root root 4.0K May 12 18:16 scaling_setspeed
If you are running on a Sandybridge based system you will be using the intel_pstate driver. This scaling driver has an internal governor and does issue the CPUFREQ_{PRE/POST}CHANGE notifications like other governors. What are you using time in state for maybe I can help you get the information you need. --Dirk
Created attachment 101281 [details] munin cpuspeed plugin I am using it for munins cpuspeed plugin.
The information returned by cpufreq stats for current intel CPU's is a well documented fiction since the scaling driver only requests a given P state/frequency the actual frequency the package runs at is decided by the CPU itself based on the requests from all cores/threads. The info that you are getting from cpufreq stats is only what requests were made and not frequency. intel_pstate reportes the frequency that the core last ran at which is as close as I can get to reality is available from /proc/cpuinfo or from /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq