Skip to contentSkip to conversation

2.5.64-mm6

DISCUSSION Andi Kleen 2 participants 2 messages Mar 13, 2003 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#1 lore raw
Quoted 6 lines · Andrew Morton

This means that large cache-cold executables start significantly faster. Launching X11+KDE+mozilla goes from 23 seconds to 16. Starting OpenOffice seems to be 2x to 3x faster, and starting Konqueror maybe 3x faster too. Interesting.

This might cause weird thing to happen, especially on small-memory machines.

That's great. It would be nice to have this as a sysctl or perhaps some heuristic based on file size and available memory for 2.6.

-Andi

#2 lore raw
Quoted 9 lines · Andi Kleen
Quoted 5 lines · Andrew Morton

This means that large cache-cold executables start significantly faster. Launching X11+KDE+mozilla goes from 23 seconds to 16. Starting OpenOffice seems to be 2x to 3x faster, and starting Konqueror maybe 3x faster too. Interesting.

Quoted 5 lines
Quoted 1 line

This might cause weird thing to happen, especially on small-memory machines.

That's great. It would be nice to have this as a sysctl or perhaps some heuristic based on file size and available memory for 2.6.

We shouldn't be putting this in-kernel, really. Userspace can obtain the same results by running madvise(MADV_WILLNEED) against the mapping immediately after setting it up. So a simple

	map = mmap(...);

+ if (getenv("MAP_PREFAULT"))
+ madvise(map, len, MADV_WILLNEED);

in glibc is enough.

That will work on 2.4, too. I haven't tested that though.