[llvm-bugs] [Bug 38610] New: ThinLTO doesn't use all virtual cores as advertised

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 16 18:05:07 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38610

            Bug ID: 38610
           Summary: ThinLTO doesn't use all virtual cores as advertised
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mh+llvm at glandium.org
                CC: llvm-bugs at lists.llvm.org

The ThinLTO documentation (https://clang.llvm.org/docs/ThinLTO.html) says:

  By default, the ThinLTO link step will launch up to
std::thread::hardware_concurrency number of threads in parallel. For machines
with hyper-threading, this is the total number of virtual cores.

That appears not to be true. On a machine with 8 cores and 16 hyper-threads,
std::thread::hardware_concurrency returns 16, but the linkage (with lld) only
uses 8 threads. I have to manually pass --thinlto-jobs=16 for 16 threads to be
used. This does make a difference, where the linkage with 16 threads takes 75%
of the time the one with 8 threads takes.

Tangentially, GCC has (opt-in) Make jobserver support, which is even better.

-- 
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/20180817/ece305bb/attachment-0001.html>


More information about the llvm-bugs mailing list