Uh oh!
There was an error while loading. Please reload this page.
Enable Big/Super Pages for v3d - #7285
Conversation
2e9acf3 to
6ad963aComparec60b428 to
8298673Compare8298673 to
48996f0Comparepopcornmix
commented
May 18, 2026
I have run various 3d related benchmarks to check the effect of these settings. 5 runs of each. The percentages are change from default. An Any suggestions for a test that shows a clear benefit? aqua5000: https://webglsamples.org/aquarium/aquarium.html with 5000 fish |
mairacanal
commented
May 25, 2026
Thanks for sharing these results. I'm under the impression that using traces might be masking other side-effects that using THP has on the system. I'll investigate it further and run benchmarks without traces. |
popcornmix
commented
May 26, 2026
I'm testing with RpiOS trixie mesa - are you testing with something closer to master? |
Yes, for the results I previously shared, I was using Mesa mainline (commit 3ea293a9d1d). |
popcornmix
commented
Jun 3, 2026
I've added Any view on the safety if bumping mesa closer to git master in our trixie repo? |
mairacanal
commented
Jun 4, 2026
I have the impression that bumping to 26.1 should be safe, but I’ll check with the Mesa experts to confirm. I’ll also see whether there is a small set of commits we can cherry-pick, and then I’ll get back to you with a solution. |
48996f0 to
b2316a1Comparemairacanal
commented
Jun 5, 2026
@popcornmix, in order to make sure our results are similar and compatible, would you mind sharing your benchmarking scripts? |
The browser benchmarks use CDP to launch benchmarks and grab results. I've attached the version I last used I'd be interested in your scores from any of those (especially the ones I report as having bigger performance gains). Note: I convert a meaure from output to a score (bigger is better) with:
I (with claude) extended this to also support Firefox (and BiDi) and the last run didn't show the significant boosts with latest mesa (even on chromium), so I am now a bit less confident with the gains observed. They were consistent enough across multiple runs and multiple benchmarks that it was measuring something, but there may be some other variable in play. The framework that launches them has a lot of dependencies (e.g. switching branches and building/installing kernel and bootloader on our build server, building mesa, adjusting config.txt/cmdline.txt/eeprom-config) so might be quite a job to get running somewhere else. |
mairacanal
commented
Jun 5, 2026
Thanks for sharing the script! I'll use it to evaluate the possible gains across Mesa commits. About the performance gains, I'd also be a bit skeptical about +20% performance improvements. From our collection traces, there was a consistent measurable impact on the performance, but as you can see it averaged around +2%, with the biggest improvement being Google Maps with +10%. Having said that, I'll run the benchmark locally and bring the results back to you. |
Considering that the Raspberry Pi is an embedded device with limited memory, memory fragmentation is an important aspect for performance. Using Big/Super Pages has clear benefits when it comes to reducing TLB misses, but also has an impact on memory fragmentation as we need to allocate aligned contiguous memory, increasing compaction pressure and memory waste for small BOs. As Big/Super Pages only have benefits for larger BOs, create a minimum BO size to use the THP partition. After testing different thresholds, 512KB provides the most balanced results with clear improvements and no significant regressions. This means that Big/Super Pages will only be used for BOs of at least 512KB. Signed-off-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
b2316a1 to
ba81860Compare
Considering that the Raspberry Pi is an embedded device with limited memory, memory fragmentation is an important aspect for performance. Using Big/Super Pages has clear benefits when it comes to reducing TLB misses, but also has an impact on memory fragmentation as we need to allocate aligned contiguous memory, increasing compaction pressure and memory waste for small BOs.
As Big/Super Pages only have benefits for larger BOs, create a minimum BO size to use the THP partition. After testing different thresholds, 512KB provides the most balanced results with clear improvements and no significant regressions. This means that Big/Super Pages will only be used for BOs of at least 512KB.
Here are some benchmark results. Each trace has been run twice to gather the results.