SolidRun / lx2160a_build

Scripts to build basic images for LX2160A COM express type 7 modules
58 stars 47 forks source link

CPU stuck at slowest speed in kernel 5.4 #46

Open marty1885 opened 4 years ago

marty1885 commented 4 years ago

Hi,

I find my LX2K board stuck at all cores 1GHz under any load (even with stress -c 16) when running kernel 5.4. But can perfectly run to 2.0GHz all cores on 4.19. And cpupower seems to suggest the frequency scaling is broken on 5.4.

# On Linux 5.4 (I have set the governor to ondemand manually, not the default value of performance)
❯ sudo cpupower frequency-info
analyzing CPU 0:
  driver: qoriq_cpufreq
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0 1
  maximum transition latency: 9 ns
  hardware limits: 1000 MHz - 2.00 GHz
  available frequency steps:  1000 MHz, 1000 MHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 1000 MHz and 1000 MHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency: 1000 MHz (asserted by call to hardware)

# On Linux 4.19
analyzing CPU 0:
  driver: qoriq_cpufreq
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0 1
  maximum transition latency: 9 ns
  hardware limits: 1000 MHz - 2.00 GHz
  available frequency steps:  2.00 GHz, 1000 MHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 1000 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency: 1000 MHz (asserted by call to hardware)

If this a configuration problem on my side or a general problem on kernel 5.4?

Thanks

rabeeh commented 4 years ago

How to reproduce this? Have you done any modprobe before that?

I just ran 'mhz' tool from lmbench and it reports 2GHz; so most probably either scaling governor fixed to 1GHz or mis-report of 'cpupower'

ericvh commented 4 years ago

I see this from my cpuinfo and when I ran mhz it reported 999MHz....

marty1885 commented 4 years ago

@rabeeh Hi, I've been trying to replicate this issue. It seems to happen randomly and I can't find a way to force it. For me it happens about twice in 50 boots using kernel 5.4. Sorry.

I think it is the governor broken somewhere. Not only cpupower reports 1GHz when it happens. netdata also reports 1GHz. And compiling code when the bug is active is visibly slower.