<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - polling and exponential backoff when waiting for a module to build is terrible"
href="http://llvm.org/bugs/show_bug.cgi?id=20794">20794</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>polling and exponential backoff when waiting for a module to build is terrible
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Modules
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>richard-llvm@metafoo.co.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>LockFileManager uses polling (starting at 1s intervals) with exponential
backoff to wait for a lock file to become available. This results in
ridiculously bad performance when performing parallel builds using modules:
each build action other than the one that actually builds the module waits (on
average) 50% longer than it needs to, for modules that it uses to become
available.
(It's actually worse than that, even: if module A depends on module B, then the
action that builds A can wait for the action that builds B, and people who
depend on A get stung *twice* by unnecessary waits.)
I've also been informed that the implementation is vulnerable to races.
We should use a better mechanism here. Perhaps inotify or a named pipe could be
used to more reliably wait until module builds finish.</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>