Re: Downsides to madvise/fadvise(willneed) for application startup

From: Andrew Morton
Date: Thu Apr 15 2010 - 18:53:21 EST


On Mon, 05 Apr 2010 15:43:02 -0700
Taras Glek <tglek@xxxxxxxxxxx> wrote:

> To make matters worse,
> the compile-time linker + gcc lay out code in a manner that does not
> correspond to how the resulting executable will be executed(ie the
> layout is basically random).

Yes, the linker scrambles the executable's block ordering.

This just isn't an interesting case. World-wide, the number of people
who compile their own web browser and execute it from the file which ld
produced is, umm, seven.

So I'd suggest that you always copy the executable to a temp file and
mv it back before running any timing tests.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/