Uh oh!
There was an error while loading. Please reload this page.
Fix the heuristics for L3 cache size for Arm64 - #71029
Conversation
kunalspathak
commented
Jun 21, 2022
ghost
commented
Jun 21, 2022
Tagging subscribers to this area: @dotnet/gc Issue DetailsWhile L3 cache size is undetermined on Arm64 machines, if we don't get it, use a fixed heuristics based upon the core count.
|
There was a problem hiding this comment.
Q (also applies to the old src) - what does sysconf return if there's no cache of that level? I presume it returns 0, not -1 (the doc says it returns -1 if there's an error).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kunalspathak
commented
Jun 21, 2022
@dotnet/jit-contrib , @davidwrighton , @jkotas |
| return result; | ||
| } | ||
| #define UPDATE_CACHE_SIZE_AND_LEVEL(CACHE_LEVEL) if (size > cacheSize) { cacheSize = size; cacheLevel = CACHE_LEVEL; } |
There was a problem hiding this comment.
One last nit - please feel free to do that later if you want to get this in before today's snap for preview 6.
Looking at the usages of this macro, I have realized it would be great to make the size a parameter of the macro too. From the usage sites, it is not obvious where it gets the size from (I have to read the macro definition to figure it out).
There was a problem hiding this comment.
Sure, will do it in follow-up PR
Linux/arm64 improvements:
windows/arm64 improvements: |
While L3 cache size is undetermined on Arm64 machines, if we don't get it, use a fixed heuristics based upon the core count.
This led to removing the obscure heuristics we have currently that just multiplies the cache size by 3.