Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logfiles: Add CPU governor details to 03_Hardware.log #675

Merged
merged 1 commit into from Aug 29, 2016

Conversation

@MilhouseVH
Copy link
Contributor

MilhouseVH commented Aug 29, 2016

This PR will add governor (cpufreq) details to the 03_Hardware.log.

Modern Intel CPUs will use Intel P-States, while non-Intel (or older Intel) hardware will use one of the in-kernel CPUFreq governors.

Not all hardware will use the same CPUFreq governor, eg. RPi/RPi2 will use ondemand (default in the kernel, and then forced in platform_init), while WeTek_Hub will use hotplug (even though the kernel default is performance), and other hardware/platforms may use performance or ondemand (eg. the Revo 3700 - Intel Atom D525 - will use performance even though the default governor for Generic is ondemand).

So, having this information written to the logfiles might be useful...

Not all hardware will have accessible governor details (eg. Xstreamer Ultra2) in which case less information will be output.

Examples:

RPi3 (force_turbo=1, small ARM overclock to 1300MHz):

################################################################################
# ... output of get_governor_details
# LibreELEC release: RPi2.arm-devel-20160829015023-#0828-g7cef50d
# LibreELEC git: 7cef50da82da7d64a367fd680b1c2de9552449a8
################################################################################
/sys/devices/system/cpu
    cpu0                           : <dir>
    cpu1                           : <dir>
    cpu2                           : <dir>
    cpu3                           : <dir>
    cpufreq                        : <dir>
    cpuidle                        : <dir>
    kernel_max                     : 3
    online                         : 0-3
    possible                       : 0-3
    present                        : 0-3
/sys/devices/system/cpu/cpufreq
    ondemand                       : <dir>
    policy0                        : <dir>
/sys/devices/system/cpu/cpu0/cpufreq
    affected_cpus                  : 0 1 2 3
    cpuinfo_cur_freq               : 1300000
    cpuinfo_max_freq               : 1300000
    cpuinfo_min_freq               : 1300000
    cpuinfo_transition_latency     : 355000
    related_cpus                   : 0 1 2 3
    scaling_available_frequencies  : 1300000 1300000
    scaling_available_governors    : powersave ondemand performance
    scaling_cur_freq               : 1300000
    scaling_driver                 : BCM2835 CPUFreq
    scaling_governor               : ondemand
    scaling_max_freq               : 1300000
    scaling_min_freq               : 1300000
    scaling_setspeed               : <unsupported>
/sys/devices/system/cpu/cpu1/cpufreq
    affected_cpus                  : 0 1 2 3
    cpuinfo_cur_freq               : 1300000
    cpuinfo_max_freq               : 1300000
    cpuinfo_min_freq               : 1300000
    cpuinfo_transition_latency     : 355000
    related_cpus                   : 0 1 2 3
    scaling_available_frequencies  : 1300000 1300000
    scaling_available_governors    : powersave ondemand performance
    scaling_cur_freq               : 1300000
    scaling_driver                 : BCM2835 CPUFreq
    scaling_governor               : ondemand
    scaling_max_freq               : 1300000
    scaling_min_freq               : 1300000
    scaling_setspeed               : <unsupported>
/sys/devices/system/cpu/cpu2/cpufreq
    affected_cpus                  : 0 1 2 3
    cpuinfo_cur_freq               : 1300000
    cpuinfo_max_freq               : 1300000
    cpuinfo_min_freq               : 1300000
    cpuinfo_transition_latency     : 355000
    related_cpus                   : 0 1 2 3
    scaling_available_frequencies  : 1300000 1300000
    scaling_available_governors    : powersave ondemand performance
    scaling_cur_freq               : 1300000
    scaling_driver                 : BCM2835 CPUFreq
    scaling_governor               : ondemand
    scaling_max_freq               : 1300000
    scaling_min_freq               : 1300000
    scaling_setspeed               : <unsupported>
/sys/devices/system/cpu/cpu3/cpufreq
    affected_cpus                  : 0 1 2 3
    cpuinfo_cur_freq               : 1300000
    cpuinfo_max_freq               : 1300000
    cpuinfo_min_freq               : 1300000
    cpuinfo_transition_latency     : 355000
    related_cpus                   : 0 1 2 3
    scaling_available_frequencies  : 1300000 1300000
    scaling_available_governors    : powersave ondemand performance
    scaling_cur_freq               : 1300000
    scaling_driver                 : BCM2835 CPUFreq
    scaling_governor               : ondemand
    scaling_max_freq               : 1300000
    scaling_min_freq               : 1300000
    scaling_setspeed               : <unsupported>

Xstreamer Ultra2 (Intel Atom, 4.7.2 kernel):

/sys/devices/system/cpu
    cpu0                           : <dir>
    cpu1                           : <dir>
    cpu2                           : <dir>
    cpu3                           : <dir>
    cpufreq                        : <dir>
    cpuidle                        : <dir>
    hotplug                        : <dir>
    kernel_max                     : 15
    microcode                      : <dir>
    modalias                       : cpu:type:x86,ven0000fam0006mod0036:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000B,000C,000D,000E,000F,0010,0011,0013,0015,0016,0017,0018,0019,001A,001B,001C,001D,001F,002B,0034,003D,0068,006B,006C,006D,006F,0072,0074,0075,0078,007C,007D,0080,0082,0083,0084,0088,0089,008D,008E,008F,0096,00C0,01C0,01C2
    online                         : 0-3
    possible                       : 0-3
    power                          : <dir>
    present                        : 0-3
/sys/devices/system/cpu/cpufreq

Intel Skylake (i5-6260U):

################################################################################
# ... output of get_governor_details
# LibreELEC release: Generic.x86_64-devel-20160829015023-#0828-g7cef50d
# LibreELEC git: 7cef50da82da7d64a367fd680b1c2de9552449a8
################################################################################
/sys/devices/system/cpu
    cpu0                           : <dir>
    cpu1                           : <dir>
    cpu2                           : <dir>
    cpu3                           : <dir>
    cpufreq                        : <dir>
    cpuidle                        : <dir>
    hotplug                        : <dir>
    intel_pstate                   : <dir>
    kernel_max                     : 15
    microcode                      : <dir>
    modalias                       : cpu:type:x86,ven0000fam0006mod004E:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000B,000C,000D,000E,000F,0010,0011,0013,0015,0016,0017,0018,0019,001A,001B,001C,001D,001F,002B,0034,003A,003B,003D,0068,006A,006B,006C,006D,006F,0070,0072,0074,0075,0076,0078,007C,007D,0080,0081,0082,0083,0084,0085,0087,0088,0089,008B,008C,008D,008E,008F,0091,0093,0094,0095,0096,0097,0098,0099,009A,009B,009C,009D,009E,00C0,00C5,00C8,00E3,00EF,0100,0101,0102,0103,0104,0120,0121,0122,0123,0125,0127,0128,0129,012A,012D,012E,0132,0133,0134,0137,0139,0140,0141,0142,01C0,01C1,01C2,01C4,01C5,01C6,01C7,01C8,01C9,01CA,01CD
    online                         : 0-3
    possible                       : 0-3
    power                          : <dir>
    present                        : 0-3
/sys/devices/system/cpu/cpufreq
    policy0                        : <dir>
    policy1                        : <dir>
    policy2                        : <dir>
    policy3                        : <dir>
/sys/devices/system/cpu/cpu0/cpufreq
    affected_cpus                  : 0
    cpuinfo_cur_freq               : 645446
    cpuinfo_max_freq               : 2900000
    cpuinfo_min_freq               : 400000
    cpuinfo_transition_latency     : 4294967295
    related_cpus                   : 0
    scaling_available_governors    : performance powersave
    scaling_cur_freq               : 645446
    scaling_driver                 : intel_pstate
    scaling_governor               : powersave
    scaling_max_freq               : 2900000
    scaling_min_freq               : 400000
    scaling_setspeed               : <unsupported>
/sys/devices/system/cpu/cpu1/cpufreq
    affected_cpus                  : 1
    cpuinfo_cur_freq               : 1269689
    cpuinfo_max_freq               : 2900000
    cpuinfo_min_freq               : 400000
    cpuinfo_transition_latency     : 4294967295
    related_cpus                   : 1
    scaling_available_governors    : performance powersave
    scaling_cur_freq               : 1269689
    scaling_driver                 : intel_pstate
    scaling_governor               : powersave
    scaling_max_freq               : 2900000
    scaling_min_freq               : 400000
    scaling_setspeed               : <unsupported>
/sys/devices/system/cpu/cpu2/cpufreq
    affected_cpus                  : 2
    cpuinfo_cur_freq               : 1719030
    cpuinfo_max_freq               : 2900000
    cpuinfo_min_freq               : 400000
    cpuinfo_transition_latency     : 4294967295
    related_cpus                   : 2
    scaling_available_governors    : performance powersave
    scaling_cur_freq               : 1719030
    scaling_driver                 : intel_pstate
    scaling_governor               : powersave
    scaling_max_freq               : 2900000
    scaling_min_freq               : 400000
    scaling_setspeed               : <unsupported>
/sys/devices/system/cpu/cpu3/cpufreq
    affected_cpus                  : 3
    cpuinfo_cur_freq               : 2068176
    cpuinfo_max_freq               : 2900000
    cpuinfo_min_freq               : 400000
    cpuinfo_transition_latency     : 4294967295
    related_cpus                   : 3
    scaling_available_governors    : performance powersave
    scaling_cur_freq               : 2068176
    scaling_driver                 : intel_pstate
    scaling_governor               : powersave
    scaling_max_freq               : 2900000
    scaling_min_freq               : 400000
    scaling_setspeed               : <unsupported>
@lrusak

This comment has been minimized.

Copy link
Member

lrusak commented Aug 29, 2016

LGTM

In light of this we should look into changing all the CPU governors on all platforms to one consistent one if possible.

@MilhouseVH

This comment has been minimized.

Copy link
Contributor Author

MilhouseVH commented Aug 29, 2016

Agreed, although the governor that is actually used by the hardware isn't always the default configured in the kernel, so there's additional factors at play here which we may need to better understand.

@chewitt chewitt merged commit ccac3a8 into LibreELEC:master Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.