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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Taras Glek
Date: Thursday, April 8, 2010 - 10:44 am

On 04/07/2010 12:38 AM, Wu Fengguang wrote:
Fair enough.
That's excellent.
The first part of the file lists sections in a file and their hex 
offset+size.

lines like 0 512 offset(#1) mean a read at position 0 of 512 bytes. 
Incidentally this first read is coming from vfs_read, so the log doesn't 
take account readahead (unlike the other reads caused by mmap page faults).

So
15310848 131072 offset(#2)=====================
eaa73c 1523c .bss
eaa73c 19d1e .comment

15142912 131072 offset(#3)=====================
e810d4 200 .dynamic
e812d4 470 .got
e81744 3b50 .got.plt
e852a0 2549c .data

Shows 2 reads where the dynamic linker first seeks to the end of the 
file(to zero out .bss, causing IO via COW) and the backtracks to
read in .dynamic. However you are right, all of the backtracking reads 
are over 64K.
Thanks for explaining that. I am guessing your change to boost 
readaround will fix this issue nicely for firefox.

Released it yesterday. Hopefully other bloated binaries will benefit 
from this too.

http://blog.mozilla.com/tglek/2010/04/07/icegrind-valgrind-plugin-for-optimizing-cold-...

Thanks a lot Wu, I feel I understand the kernel side of what's happening 
now.

Taras
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Downsides to madvise/fadvise(willneed) for application ..., Taras Glek, (Thu Apr 8, 10:44 am)