ACouCam
Posts: 17
Joined: Mon Feb 24, 2014 7:16 pm

Disable_L2cache - No boot

Thu Dec 11, 2014 8:17 am

Hi!

We have a very GPU intensive program running on the Raspberry and wondered if the Config.txt option Disable_l2cache = 1 would speed things up. But instead with this option set to the config file the raspberry won't boot any more and just shows a black screen. Tried this a couple of times and the same behavior persists.
Anyone having the same problems?

Regards,
Jonas

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26659
Joined: Sat Jul 30, 2011 7:41 pm

Re: Disable_L2cache - No boot

Thu Dec 11, 2014 8:39 am

I suspect turning off L2 cache won;t make much difference anyway, but Dom is the expert here. I'll flash up this post to him.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5537
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Disable_L2cache - No boot

Thu Dec 11, 2014 2:10 pm

You alsa need to rebuild the kernel with:
CONFIG_BCM2708_NOL2CACHE=y

to stop the arm from using the L2 cache.

However if the arm is fairly idle when the GPU is busy it won't make a lot of difference.
If the arm is busy it could help.

Increasing core_freq would almost certainly help more. sdram_freq may also be worth increasaing.

ACouCam
Posts: 17
Joined: Mon Feb 24, 2014 7:16 pm

Re: Disable_L2cache - No boot

Thu Dec 11, 2014 7:28 pm

Thanks DOM for your reply.

Yes our project is indeed both CPU and GPU intensive, now CPU usage is at about 70% (most of it comes from streaming data over SPI about 0.9MByte/s) along with outputting Audio and some other stuff. The GPU then continuously do some heavy calculations together with a continuous camera stream from a raspberry camera.

But to cut it short, it is rather easy then to test the Disable_l2cache with the right kernel.
Ps. We're trying to avoid overclocking as far as possible, in the fear that it could add stability issues.

Regards,
Jonas

ACouCam
Posts: 17
Joined: Mon Feb 24, 2014 7:16 pm

Re: Disable_L2cache - No boot

Fri Dec 12, 2014 9:31 am

Well this doesn't seem so relevant anymore. Just updated to the new kernel 3.12.34+ from a max. 3 weeks old one and now suddenly we're seeing a very large improvement in FPS. Seems like it somehow almost doubled the FPS of our program.
Don't know if some bugs regarding Audio/Raspicam&mmal/GPU or something has been fixed or we just had something corrupt in the earlier firmware (If that is even possible as a reason).
At the same time, just with the kernel + apt-get update/upgrade, the CPU usage of the program rose from about 70 -> 95%.

Jonas

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5537
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Disable_L2cache - No boot

Fri Dec 12, 2014 11:19 am

It may be interesting to idenify the exact update that changed behaviour.
Look at the commits here and get the hash for a commit (the end of the commit URL) and you can revert with:

Code: Select all

sudo rpi-update <hash>
If you can identify the update, I can probably explain what change affected it.

ACouCam
Posts: 17
Joined: Mon Feb 24, 2014 7:16 pm

Re: Disable_L2cache - No boot

Fri Dec 12, 2014 3:27 pm

Hi!

We tried to rollback to the last kernel we had installed 3.12.33+. But the same behavior did still occur (higher FPS and higher CPU load).
Could it just be that something was not installed properly earlier, causing to the CPU to stall for short amount of times and that would now result in the higher CPU load as it gives more time to our program?
Or could apt-get upgrade/update have something to do with this?

Thanks,
Jonas

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5537
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Disable_L2cache - No boot

Fri Dec 12, 2014 3:54 pm

apt-get upgrade may have changed many packages on the arm side.
If you really want to understand you could revert to a clean raspbian install (the current one is from September) and check if that is good/bad.
If it is bad, then you can update the firmware (with rpi-update) and individually apt-get upgrade packages that you know you are using, checking after each upgrade whether the behaviour had changed.

ACouCam
Posts: 17
Joined: Mon Feb 24, 2014 7:16 pm

Re: Disable_L2cache - No boot

Fri Dec 12, 2014 4:08 pm

Ok, thanks for your reply.
Have to try that sometime with more time at hand. It would indeed be interesting to know what caused the effect but of course not 100% relevant to the project.
But as I side note we always run apt-get update/upgrade after each rpi-update so probably the changes are quite recent (between kernel versions 3.12.33+ and 3.12.34+).

Jonas

Return to “Advanced users”