Re: [RFC] Arch option to touch newly allocated pages

Richard Gooch
2002-03-07T00:04:51Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]

David Woodhouse writes:
>
> jdike@karaya.com said:
> > Yeah, MADV_DONTNEED looks right. UML and Linux/s390 (assuming VM has
> > the equivalent of MADV_DONTNEED) would need a hook in free_pages to
> > make that happen.
>
> MADV_DONTNEED
> Do not expect access in the near future. (For the
> time being, the application is finished with the
> given range, so the kernel can free resources asso­
> ciated with it.)
>
> It's not clear from that that the host kernel is actually permitted to
> discard the data.
>
> alan@lxorguk.ukuu.org.uk said:
> > VM allows you to give it back a page and if you use it again you get
> > a clean copy. What it seems to lack is the more ideal "here have this
> > page and if I reuse it trap if you did throw it out" semantic.
>
> I've wittered on occasion about other situations where such
> semantics might be useful -- essentially 'drop these pages if you
> need to as if they were clean, and tell me when I next touch them so
> I can recreate their data'.

Indeed. I'd love such a feature. It's got applications in
numerical/scientific code, not just UML.

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca