Summary: | REGRESSION(r213645): It made JSC tests super slow and timeout on AArch64 Linux | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Csaba Osztrogonác <ossy> | ||||
Component: | JavaScriptCore | Assignee: | Zan Dobersek <zan> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Blocker | CC: | benjamin, buildbot, cdumez, clopez, cmarcelo, dbates, fpizlo, mark.lam, ossy, saam, zan | ||||
Priority: | P1 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 108645, 169300 | ||||||
Attachments: |
|
Description
Csaba Osztrogonác
2017-03-11 00:46:59 PST
I disabled it on Linux in https://trac.webkit.org/changeset/213758. Please enable it again once somebody fixed this regression. We should figure out what's going on here. This is probably not a Linux versus Darwin thing but a CPU model thing. Here's a possible hint: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150921/300953.html It looks like in LLVM, they have to emit clrex when exiting ldx/stx (LL/SC) loops because "some uarchs" need it for "performance". I tried emitting clrex, and on my hardware, it made no difference. I think in our jargon, "clrex" should be called "WTF::clearLink()", since we use the old computer science terminology for this (load link, store conditional) rather than the ARM terminology (reservations). The way this would look like is that you'd want Atomic<>::transaction() to call clearLink() whenever it returns after having done a loadLink() but before the storeCond() - basically anytime that we would otherwise be leaving the link (the reservation) in place. If this works then just as transaction() abstracts LL/SC and CAS behind prepare/attempt, you probably want a giveUp() method that is a wrapper for clearLink() on LL_SC platforms and a no-op on CAS platforms. You probably want clearLink() to only be declared when HAVE(LL_SC) just as loadLink()/storeCond() are only declared when HAVE(LL_SC). I think it's OK to do clearLink() on all ARM64s, if it helps your perf. If this works, then can you also put a FIXME in B3LowerToAir's code that emits loadlink/storecond, and MacroAssembler's loadLink/storeCond code, and link it to a bug? Once I get around to implementing SharedArrayBuffer atomics, I'll definitely need to use MacroAssembler's and B3's LL/SC. It won't be possible to easily get around this. (In reply to comment #2) > We should figure out what's going on here. This is probably not a Linux > versus Darwin thing but a CPU model thing. ... Of course, yes and thanks for the detailed info. But as I said I don't and won't have to do it myself in the (near) future. If somebody else is interested in debugging this issue, feel free to pick it up. Created attachment 306092 [details]
Patch
Attachment 306092 [details] did not pass style-queue:
ERROR: Source/WTF/wtf/Atomics.h:193: Extra space before ( in function call [whitespace/parens] [4]
ERROR: Source/WTF/wtf/Atomics.h:213: Extra space before ( in function call [whitespace/parens] [4]
Total errors found: 2 in 3 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 306092 [details]
Patch
r=me
Comment on attachment 306092 [details] Patch Clearing flags on attachment: 306092 Committed r215220: <http://trac.webkit.org/changeset/215220> All reviewed patches have been landed. Closing bug. |