lkml.org 
[lkml]   [2003]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.5.64-mm6
Andi Kleen <ak@suse.de> wrote:
>
> Andrew Morton <akpm@digeo.com> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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