Re: 2.4 vm, program load, page faulting, ...

Andrew Morton
2003-03-17T23:24:39Z

wind@cocodriloo.com wrote:
>
> > This is all a bit dubious for several reasons. Most particularly, the
> > up-front instantiation of the pages in pagetables makes unneeded pages harder
> > to reclaim. It would be really neat if someone could try putting the
> > madvise(MADV_WILLNEED) into glibc and test that. Maybe on a 2.4 kernel.
>
>
> something like this one?
>

No, not at all. I meant a patch against glibc, not against the kernel!

Like this:

map = mmap(..., PROT_EXEC, ...);
+ if (getenv("MAP_PREFAULT"))
+ madvise(map, length, MADV_WILLNEED);