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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Wu Fengguang
Date: Sunday, April 11, 2010 - 7:27 pm

On Fri, Apr 09, 2010 at 01:44:41AM +0800, Taras Glek wrote:
 

Yes, every binary/library starts with this 512b read.  It is requested
by ld.so/ld-linux.so, and will trigger a 4-page readahead. This is not
good readahead. I wonder if ld.so can switch to mmap read for the
first read, in order to trigger a larger 128kb readahead. However this
will introduce a little overhead on VMA operations.


This is interesting finding to me, Thanks for the explanation :)


You are welcome.


It sounds painful to produce the valgrind log, fortunately the end
user won't suffer.

Is it viable to turn on the "-ffunction-sections -fdata-sections"
options distribution wide? If so, you may sell it to Fedora :)

Thanks,
Fengguang
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Downsides to madvise/fadvise(willneed) for application ..., Wu Fengguang, (Sun Apr 11, 7:27 pm)