[LLVMbugs] [Bug 20794] New: polling and exponential backoff when waiting for a module to build is terrible

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 28 15:48:55 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20794

            Bug ID: 20794
           Summary: polling and exponential backoff when waiting for a
                    module to build is terrible
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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.

-- 
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/20140828/75b384b3/attachment.html>


More information about the llvm-bugs mailing list