[SERVER-54684] Decreased JS performance on arm64 due to mising init function Created: 21/Feb/21 Updated: 29/Oct/23 Resolved: 24/Feb/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0, 4.2.13, 4.4.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tsahi Zidenberg | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.4, v4.2
|
||||||||
| Sprint: | Dev Platform 2021-03-08 | ||||||||
| Participants: | |||||||||
| Description |
|
This bug is in mozjs(firefox) esr-60. The function vixl::CPU::SetUp() is never called. As a result, on arm64 MozJS will clear instruction cache separately for each byte, greatly impacting JS performance. This is especially important on Graviton2 processors, where advanced kernels expose instruction cacheline size of a full page (usually, 4KB) In firefox esr 68, the SetUp function is called from js::jit::InitProcessExecutableMemory. |
| Comments |
| Comment by Githook User [ 26/Feb/21 ] |
|
Author: {'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}Message: Please see https://bugzilla.mozilla.org/show_bug.cgi?id=1442583 for https://github.com/mozilla/gecko-dev/commit/7371a080accd8dfcaf0d24072b787e143846973a |
| Comment by Githook User [ 26/Feb/21 ] |
|
Author: {'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}Message: Please see https://bugzilla.mozilla.org/show_bug.cgi?id=1442583 for https://github.com/mozilla/gecko-dev/commit/7371a080accd8dfcaf0d24072b787e143846973a |
| Comment by Githook User [ 24/Feb/21 ] |
|
Author: {'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}Message: Please see https://bugzilla.mozilla.org/show_bug.cgi?id=1442583 for https://github.com/mozilla/gecko-dev/commit/7371a080accd8dfcaf0d24072b787e143846973a |
| Comment by Tsahi Zidenberg [ 21/Feb/21 ] |
|
I don't know the MozJs ticket.. but here is the commit: https://github.com/mozilla/gecko-dev/commit/7371a080accd8dfcaf0d24072b787e143846973a
|
| Comment by Andrew Morrow (Inactive) [ 21/Feb/21 ] |
|
tsahee@amazon.com - That's fascinating. Is there a MozJS ticket for this issue? Generally we like to inspect the MozJS fix for such an issue and attempt to cherry-pick it back into our vendored MozJS sources if possible. |
| Comment by Tsahi Zidenberg [ 21/Feb/21 ] |
|
As an aside: Graviton2 shows a huge instruction cacheline size due to this workaround: https://lore.kernel.org/linux-arm-kernel/bad51442-adba-8b21-0eb2-8d1665c71524@arm.com/T/
|