<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 - ThinLTO doesn't use all virtual cores as advertised"
   href="https://bugs.llvm.org/show_bug.cgi?id=38610">38610</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ThinLTO doesn't use all virtual cores as advertised
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mh+llvm@glandium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The ThinLTO documentation (<a href="https://clang.llvm.org/docs/ThinLTO.html">https://clang.llvm.org/docs/ThinLTO.html</a>) 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.</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>