<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 13, 2016 at 5:14 PM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> On Oct 13, 2016, at 5:07 PM, Teresa Johnson <<a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a>> wrote:<br>
><br>
> tejohnson added inline comments.<br>
><br>
><br>
> ================<br>
> Comment at: include/llvm/Support/Threading<wbr>.h:121<br>
> +  /// host system, otherwise falls back to thread::hardware_concurrency()<wbr>.<br>
> +  unsigned hardware_physical_concurrency(<wbr>);<br>
> }<br>
> ----------------<br>
> mehdi_amini wrote:<br>
>> I think we may want to name it `hardware_coarse_concurrency`. Because:<br>
>><br>
>> - This looks like expressing better what we're looking after.<br>
>> - Hyperthreading is in some sense "physical concurrency", but sharing some resources.<br>
>> - Other platforms may have something in between.<br>
>><br>
> I thought about that name after you mentioned it on the prior review thread. But I felt that saying "physical concurrency" is a better expression for what it is actually trying to give you.  I think of the hyperthreading concurrency as "logical concurrency", vs physical concurrency due to physical cores.<br>
<br>
</span>Hyperthreading is sharing some physical resources on the core, but have some other physical resources duplicated/dedicated, which is why I feel it is murky. But “good enough” as well...<br>
Also, I don’t know enough the PowerPC or Sparc equivalent of hyper-threading to know how much they share/duplicate and what we would pick on these for instance.<br></blockquote><div><br></div><div>Right it is a bit murky. One reason I didn't like "coarse" is that coarse-grained parallelism relates to how closely the tasks communicate/synchronize, and I while ThinLTO backend tasks would qualify, I don't think that's why they don't scale well beyond the # physical cores (but rather the memory intensiveness as you pointed out in the other thread). I'll go with this for now.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
—<br>
<span class="m_810626850731252243HOEnZb"><font color="#888888">Mehdi<br>
<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_810626850731252243gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> <a href="tel:408-460-2413" value="+14084602413" target="_blank">408-460-2413</a></td></tr></tbody></table></span></div>
</div></div>