<div dir="ltr">IIRC, Windows can learn disk access patterns for process startup sequences so that it look-aheads executable files. I can imagine that it could even (un-)defrag executable files on disk so that scattered disk access pattern for a process boot becomes sequential accesses on an actual disk.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 17, 2016 at 3:30 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"><div class="HOEnZb"><div class="h5">On Mon, Oct 17, 2016 at 3:21 PM, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
> On Mon, Oct 17, 2016 at 3:06 PM, Davide Italiano <<a href="mailto:davide@freebsd.org">davide@freebsd.org</a>> wrote:<br>
>><br>
>> 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<br>
>> > 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<br>
>> > with<br>
>> > LLD? Can it build everything including the kernel?<br>
>> ><br>
>><br>
>> 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<br>
>> 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>
><br>
><br>
> That's an effective technique for spinning disks for sure, but how about on<br>
> SSDs?<br>
><br>
<br>
</div></div>I'm not sure, maybe not, but I think still it's worth a try as<br>
implementing it shouldn't be a herculean task.<br>
When I spoke about it with Bob Wilson he mentioned that it works for<br>
them (ld64). They feed the output of a dtrace script to the linker in<br>
particular. Your (our?) mileage may vary.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Davide<br>
<br>
"There are no solved problems; there are only problems that are more<br>
or less solved" -- Henri Poincare<br>
</div></div></blockquote></div><br></div>