CPU speed and kernel builds

Okay, I’m officially confused. I’ve been trying to increase the speed
of my BBB from the default 550MHz to 1GHz, and failing; this is with the
elderly 3.8.13-37 sources. After a few failures I went back to a seriously
ancient kernel, just to get something to run, and found that the 3.8.13-bone22
sources boot and run at 1GHz using the performance governor with no problems.

I then found that there are a set of patches for 3.12 on a Fedora mailing
list which add cpu speed setting, which implies that 3.8 can’t set the speed.
Can anyone resolve that conundrum?

I then tried building 3.14, since that’s the most recent set of fixes
(btw am335x-pm-firmware.bin is missing from the 3.14 kernel package)
and found that it couldn’t boot from the USB; it simply hung trying
to access /dev/sda. It couldn’t handle my standard NFS boot either.

Most of the kernel problems have to be configuration issues, but after a
couple of days of checking I can’t find anything missing from the USB/SCSI
setup. So does anyone have a kernel config file for 3.14, which enables
most of the peripherals?

(These are all Robert Nelson’s kernels, using his standard build method.)

Thanks for any ideas - Will

Okay, I'm officially confused. I've been trying to increase the speed
of my BBB from the default 550MHz to 1GHz, and failing; this is with the
elderly 3.8.13-37 sources. After a few failures I went back to a seriously
ancient kernel, just to get something to run, and found that the
3.8.13-bone22
sources boot and run at 1GHz using the performance governor with no
problems.

I then found that there are a set of patches for _3.12_ on a Fedora mailing
list which add cpu speed setting, which implies that 3.8 can't set the
speed.
Can anyone resolve that conundrum?

voodoo@am335x-boneblack-512mb-0:~$ uname -a
Linux am335x-boneblack-512mb-0 3.13.6-bone7 #1 SMP Fri Mar 7 21:37:01
UTC 2014 armv7l GNU/Linux

voodoo@am335x-boneblack-512mb-0:~$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: generic_cpu0
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 300 us.
  hardware limits: 300 MHz - 1000 MHz
  available frequency steps: 300 MHz, 600 MHz, 800 MHz, 1000 MHz
  available cpufreq governors: conservative, ondemand, userspace,
powersave, performance
  current policy: frequency should be within 300 MHz and 1000 MHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 300 MHz.
  cpufreq stats: 300 MHz:43.76%, 600 MHz:0.00%, 800 MHz:0.57%, 1000
MHz:55.67% (6)

I then tried building 3.14, since that's the most recent set of fixes
(btw am335x-pm-firmware.bin is missing from the 3.14 kernel package)

That actually does not matter, as it does not work outside ti's v3.12.x anyways.

and found that it couldn't boot from the USB; it simply hung trying
to access /dev/sda. It couldn't handle my standard NFS boot either.

Most of the kernel problems have to be configuration issues, but after a
couple of days of checking I can't find anything missing from the USB/SCSI
setup. So does anyone have a kernel config file for 3.14, which enables
most of the peripherals?

I actually haven't tried that in awhile, might have broke something.
(usb rootfs)

Regards,

How are you measuring the CPU frequency?

I have noticed that cpufreq-info gives different answers depending upon the arguments. With no arguments mine always returns 300 MHz when running with the 300 1000 ondemand governor. If I use the “cpufreq-info -f” command I get the same results, always 300 MHz, both at idle and under load. If I use the “sudo cpufreq-info -w” command, I get 300 MHz at idle and 1000 MHz under load. The -w option reads the frequency from the hardware and requires root privledges.

HTH
Dennis Cote

How are you powering your BBB?
I’ve heard that if you power it via USB instead of the 5V DC connector, that the CPU speed will be reduced due to the lower power.

That only applies to the BeagleBone White.

Gerald

That would be false, but ive heard teh same stories.

I run my own BBB from USB, and at idle it runs at 300Mhz, then once under a load of 66% or greater it will swing up to 1Ghz. ondemand governor I do believe.

We test the boards at the factory at 1GHz on USB and DC prior to shipping. The issue there is if you have a SD card, then that can exceed the 500mA when it is being hit hard.

Default is the governor is active and it runs at 300MHz so unless you give it something meaningful to do, it sits at 300MHz. Load it up, and it goes to 1GHz.

Gerald

2:32 PM (6 hours ago)

Okay, I’m officially confused. I’ve been trying to increase the speed
of my BBB from the default 550MHz to 1GHz, and failing; this is with the
elderly 3.8.13-37 sources. After a few failures I went back to a seriously
ancient kernel, just to get something to run, and found that the
3.8.13-bone22
sources boot and run at 1GHz using the performance governor with no
problems.

I then found that there are a set of patches for 3.12 on a Fedora mailing
list which add cpu speed setting, which implies that 3.8 can’t set the
speed.
Can anyone resolve that conundrum?

… snippage …

I got USB working in 3.14.0-rc7 by turning on most of the CONFIG_USB
stuff, but I hit a wall trying to configure the cpu frequency. In 3.8.x
at least the files under /sys/devices/system/cpu/cpu0/cpufreq are present
and correct, but with (apparently) the same flags in 3.14 there’s no sign
of any cpufreq stuff, or of any governors. I can even build and load a
governor module, and the /sys directory won’t see it and the cpufreq tools
won’t find it.

I did my USB trick and turned on every likely cpufreq flag with no change,
so it’s something pretty obscure in the config (I doubt it’s an actual bug).
Anyone any ideas? After the last three days I’m fresh out.

I then tried building 3.14, since that’s the most recent set of fixes
(btw am335x-pm-firmware.bin is missing from the 3.14 kernel package)

That actually does not matter, as it does not work outside ti’s v3.12.x anyways.

However, the 3.14.0-rc7 build fails without it.

and found that it couldn’t boot from the USB; it simply hung trying
to access /dev/sda. It couldn’t handle my standard NFS boot either.

This was a config problem, and I bodged a solution, see above.
However, the 3.14.0 cpufreq stuff still won’t fly.

Will

Robert,

When using your Debian beta image, I always get 300 MHz as the current CPU frequency for the cpufreq-info command, both at idle and under load. I also get nan% for all the entries on the cpufreq stats line at the end. I see that you are getting real percentages there.

As I noted earlier, I believe the speed is changing and cpufreq-info -w shows the correct values when idle and under load, 300 MHz and 1000 MHz.

Any idea why I am seeing these strange values, in particular the nan% values?

Hi,

Did you try compile the cpupower tool [1] which comes with the kernel?

cpupower frequency-info works as advertised on a 3.13.x kernel and a beagle bone black
On a beagle-xm it shows similar problems, but …

… I think it actually runs on 1GHz: cpufreq stats: 300 MHz:0.00%, 600 MHz:0.00%, 800 MHz:0.00%, 1000 MHz:100.00% (3)

and by mistake shows: current CPU frequency is 600 MHz (asserted by call to hardware).

cpupower frequency-info
analyzing CPU 0:
driver: generic_cpu0
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 300 us.
hardware limits: 300 MHz - 1000 MHz
available frequency steps: 300 MHz, 600 MHz, 800 MHz, 1000 MHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance
current policy: frequency should be within 300 MHz and 1000 MHz.
The governor “performance” may decide which speed to use
within this range.
current CPU frequency is 600 MHz (asserted by call to hardware).
cpufreq stats: 300 MHz:0.00%, 600 MHz:0.00%, 800 MHz:0.00%, 1000 MHz:100.00% (3)

Regards,

Robert

[1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/tools/power/cpupower?id=refs/tags/v3.13.6

Yes, but the cpufreq directories under /sys just aren’t there. It has to be a kernel config problem; could you please pastebin your 3.13 kernel config somewhere, and I’ll try building 3.14 against that.

Will

Hi Will,

Hi,

    Hi,

    Did you try compile the cpupower tool [1] which comes with the kernel?

Yes, but the cpufreq directories under /sys just aren't there. It has
to be a kernel config problem; could you please pastebin your 3.13
kernel config somewhere, and I'll try building 3.14 against that.

that's my config: http://pastebin.com/VZS4epai

Regards,

Robert

Thanks, that was a lifesaver. It compiled fine with the 3.14 kernel, and brought up all the /sys/…/cpu/… stuff, and the BBB defaulted to 1GHz on the performance governor. So now everything is working with 3.14, all I have to do is find out which driver was missing, and rebuild my current kernel

Many, many thanks - Will