[llvm-bugs] [Bug 46739] New: Multi thread allocation performance issues
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jul 15 19:58:49 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46739
Bug ID: 46739
Summary: Multi thread allocation performance issues
Product: compiler-rt
Version: 11.0
Hardware: Other
OS: other
Status: NEW
Severity: release blocker
Priority: P
Component: scudo
Assignee: unassignedbugs at nondot.org
Reporter: sy2.lee at samsung.com
CC: llvm-bugs at lists.llvm.org
We try to apply scudo to android R os on Galaxy S20.
But scudo has allocation performance issue when we test Geekbench 5.1.1
multi-core cases.
Some cases got lower point than Jemalloc that we used previous android version.
Scudo Jemalloc
HTML5 1450 2886
Face Detection 3274 3749
(Higher is better)
These tests seems allocate a lot of large size of memory with 8 threads.
There are lock contention happened between threads when threads try to allocate
on secondary cache.
lockSlow, especially, is bottle-neck on these cases.
If we change HybridMutex::lock to use only "yield and trylock" as below, HTML5
score improve to 2161.
class HybridMutex {
public:
.............
NOINLINE void lock() {
if (LIKELY(tryLock()))
return;
#ifdef __clang__
#pragma nounroll
#endif
while (true) {
yieldProcessor(NumberOfYields);
if (tryLock())
return;
}
}
We consider test result show lockSlow wake threads up is too slow.
This is not whole reason of multi-core test result, HybridMutex::lock has
performance problem to using android R os.
Could you invest these multi-thread allocation performance issue?
Thank you.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200716/f1b9ba7e/attachment.html>
More information about the llvm-bugs
mailing list