<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 17, 2016 at 3:06 PM, Davide Italiano <span dir="ltr"><<a href="mailto:davide@freebsd.org" target="_blank">davide@freebsd.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Oct 17, 2016 at 2:26 PM, Rui Ueyama via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> This is a list of items that popped in my mind. Not exhaustive but probably<br>
> good enough to start discussing what we should do next.<br>
><br>
>  - FreeBSD: what is the status of building the entire FreeBSD system with<br>
> LLD? Can it build everything including the kernel?<br>
><br>
<br>
</span>Another idea, which I discussed with Rafael and Michael a bit ago.<br>
Implement support for order file. For starters, you don't need anything fancy.<br>
Just get a list of symbols (which can be generated by systap or a<br>
profiler) and pass that to the linker, so that sections are laid out<br>
according to the partial order defined in the file (you can always<br>
reconstruct a total order starting from a partial order using some<br>
heuristic). This is particularly useful to improve startup time as you<br>
reduce the amount of paging. Firefox uses this for sure, and<br>
apparently ld64 implements this algorithm (or a slight variation of<br>
it). I'm confident this is quite effective (see Martin Liska's thesis<br>
which contains a more detailed description of the problem and<br>
references <a href="https://arxiv.org/pdf/1403.6997.pdf" rel="noreferrer" target="_blank">https://arxiv.org/pdf/1403.<wbr>6997.pdf</a>)<br></blockquote><div><br></div><div>That's an effective technique for spinning disks for sure, but how about on SSDs?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Once this is done, and we convince ourselves is a good thing, we can<br>
try implementing Pettis-Hansen ordering (guided by profiling<br>
informations) as Srinaman did for gold.<br>
<a href="https://sourceware.org/ml/binutils/2011-03/msg00230.html" rel="noreferrer" target="_blank">https://sourceware.org/ml/<wbr>binutils/2011-03/msg00230.html</a><br>
That should help putting code accessed frequently together near to<br>
reduce I-cache traffic etc..<br>
I'm not sure if it's actually effective (I hope so), maybe<br>
Srinaman/David have more informations about it.<br>
<br>
Thanks,<br>
<br>
--<br>
Davide<br>
</blockquote></div><br></div></div>