Place /link library code into sram for speed improvement

Hello,
I am using libev in my main application on the colibrivf61 under Linux.
As of today the library overhead is slowing down my application significantly (instead of using simple signals).
I did some tests and found out that the library often isn’t loaded out of the cache (depending on the size of the test application) and the instruction is loaded out of the sdram.
Therefore I wanted to know:

  • How can I veryfy that L2 cache ist active (I am using yocto to build the OS)
  • How can I force the linker to store the instruction code of the library (or at least some core functions) into the faster sram instead of the default sdram?

Side notes:

  • I used lttng to measure the timing/overhead of libev
  • if the library runs out of the cache I have a performance improvement of around factor 3

Best regars
Andreas

Hi @Weieran and Welcome to the Toradex Community!

Could you provide the version of the hardware (including carrier board) and software of your module?

What is your application?
What exactly are you trying to do?

I did some tests and found out that the library often isn’t loaded out of the cache (depending on the size of the test application) and the instruction is loaded out of the sdram. Therefore I wanted to know:

Which tests exactly have you done?
Could you provide some results?

Thanks and best regards,
Jaski