Messages in this thread | | | Date | Thu, 13 Mar 2003 11:32:09 -0800 | From | Andrew Morton <> | Subject | Re: 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/
| |