[Webkit-unassigned] [Bug 169510] REGRESSION(r213645): It made JSC tests super slow and timeout on AArch64 Linux

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 11 07:44:50 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=169510

--- Comment #2 from Filip Pizlo <fpizlo at apple.com> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170311/a7501c7f/attachment.html>


More information about the webkit-unassigned mailing list