Re: AIX disclaim() or Tru64 madvise (MADV_DONTNEED) needed

Christoph Rohland (hans-christoph.rohland@sap-ag.de)
20 Aug 1999 15:47:58 +0200


Tethys <tethys@it.newsint.co.uk> writes:

> Christoph Rohland <hans-christoph.rohland@sap-ag.de> writes:
>
> > Also I am not sure which API should be used:
>
> I'd go for madvise() -- it's more widespread than disclaim(),
> even if details may differ slightly between implementations.
> Neither are in the SUS v2 spec, although I don't know about v3.
>
> > (1) madvise is known on many systems, but they do not agree about the
> > meaning of MADV_DONTNEED. Most of them only use it as hint to page
> > this area out. Perhaps a flag MADV_FREE or MADV_DISCLAIM would be
> > better.
>
> Why is this a problem? Whether the pages ares freed immediately
> or merely marked to be freed at a later time should be of no
> relevance to the application, only to the OS. Or are you relying
> on the zero-fill-on-demand behaviour? What do you do on other
> OSes that don't support this (e.g., Solaris)?

Because the other OS's do not free the pages but it only gives a hint
to the memory subsystem that these pages are not needed in the near
future so it can be paged out.

Christoph

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/