Re: Unices are created equal, but ...

David S. Miller (davem@caip.rutgers.edu)
Wed, 17 Apr 1996 18:24:33 -0400


From: "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>
Date: Wed, 17 Apr 1996 09:51:51 +0100

Isn't there a function madvise() to give the kernel some hints about
the expected access patterns? These hints should somehow enter memory
management structures so that the pager can take advantage of the
hints...

madvise() is found under SunOS and Solaris (a working one that
actually does something, that is) and this only works decently because
of the segment driver structure of the Sun hat layer. The way it
works is that when you take a fault, you call the segment driver
specific fault handler to satisfy the request.

So you have something like a segment driver for anonymous pages, one
for vfs pages, frame buffer device drivers and other devices can have
segment drivers for mmap()'d devices etc.

With linux where everything is so snug and close together and
integrated such a madvise() thing would be more harm than good and
god-awful to maintain.

I would suggest if such a facility is needed than to implement it
using a different interface.

Something like a per-process swap-method sounds like it would work.
So my big scanning reasearcher code data-set program would use a
chunking style of swapping and my interactive programs would use the
current page-level vmscan method.

Comments?

Later,
David S. Miller
davem@caip.rutgers.edu