change in code location in external flash causes major performances gap

philippe_44
Posts: 26
Joined: Thu May 23, 2019 3:05 pm

change in code location in external flash causes major performances gap

Postby philippe_44 » Mon Sep 21, 2020 1:07 am

Hi - I have a fairly CPU intensive application that works well, but I've noticed that I can have large changes in CPU consumed by the same thread just by changing the mapping of the flash (simply by having a part of code present or not). There is no difference in thread scheduling due to that code being there or not (think about it as unused code but that cannot be removed by the linker).

By fairly large I mean that thread can occupy either 30% or 40% of CPU depending on the mapping. The value is totally consistent "within" one mapping option.

Is there something that can be done wrt cache handling or is this an issue with where some functions/inner loops are aligned with 32 bytes pages?

Thanks

ESP_Sprite
Posts: 9715
Joined: Thu Nov 26, 2015 4:08 am

Re: change in code location in external flash causes major performances gap

Postby ESP_Sprite » Tue Sep 22, 2020 8:30 am

Interesting; alignment of functions is expected to cause some performance effects, but 30-40% is a lot... is there any chance you could share a minimum project that displays this effect?

Who is online

Users browsing this forum: Baidu [Spider] and 281 guests