<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54961>54961</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Hyperthread detection in LLD LTO
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
xkszltl
</td>
</tr>
</table>
<pre>
When using LLD+LTO to build LLVM itself, by default it'll detect hardware concurrency and utilize all cores.
However, seems it only use up to the physical cores.
For example, in the below screenshot from a single socket 18C/36T Xeon Gold 6154, we only observed up to about 1800% of single-process utilization.
<img width="466" alt="image" src="https://user-images.githubusercontent.com/5203025/163800763-b74b91c8-6412-4a25-b56d-1d6c3b148b43.png">
- Is this expected?
- Is this intentional, e.g. maybe lld can already utilize ALU's so well without extra PC.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdkslynDAQhp8GLl1Q7IYDB3scx6maVHLIdtXSA4oFoiThMX76tJjJ4lRRgFrS339_3dzIrf8-4gyrU_MAx-N9VNwdv3wCb4CvSksKffsIyjvUp6g4AN9A4omt2lMwKm60prVH4WFkVp6ZRRBmFqu1OIsN2Cxh9UqrVwRGZ4Wx6NIou4-y20dzxme0QdUhTo4Ewcx6Iy8I6xIs-BFhGTenBHt798FYwBc2LRrDfTXvRzlqcwYnLOLsRuPhZM0EDEJtGsEZ8YQe8vYQFQ9l8wV-oJnhvaEqm7yugtAZLxYMd2ifUV59MG7WcDHLoqIGc7oqJos1Ap27lsi8MvPV4PVdHtQ0wFlJP0YlsS2qpqE3sfCXtZrYgCHirLhERu8XF5W35JEeYmGT_ZBLB-XHlYcIIfY4-1SYic7URVZmRU1_eVOSx5umTPhNxbtctElT5UVSsaJOeN3IJJeNKHletbwq02UeKGFUvvvXcwIfHNFUjgAv1FiUUfnw_5ba81O5TAdsmA4pTGzjCJpoCjZThRaZ3P50__b4lcbFURMIMk3CmYoJUPHFWwafD2ks-1J2Zcdir7zG_nFb0PoxqFxHjNKFTtOQAo1ovFrdv4V1AXSlovXz70_o008SoKVybkUXoFVdk8dj31YSs7qrM16X4ka2WcsqKfPqdGKnusuLWDMaK9dH9R2xmvEMu0TgVt_Hqi-yosiqvM3zosmatONdnTcZa7q2Y5JVUZXhxJROg4_U2CG2_W6Jr4OjTa2cd383mXNqmBH3dKTPVqJk-5cn96q9jvfU_W79F4cAMss">