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/