<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Multi thread allocation performance issues"
href="https://bugs.llvm.org/show_bug.cgi?id=46739">46739</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Multi thread allocation performance issues
</td>
</tr>
<tr>
<th>Product</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>scudo
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sy2.lee@samsung.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>