[lkml]   [2003]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.5.64-mm6
Andi Kleen <> wrote:
> Andrew Morton <> writes:
> > 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.

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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.031 / U:10.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site