is mincore() support planned?

Vivek Sadananda Pai (vivek@cs.rice.edu)
Tue, 19 Oct 1999 13:17:51 -0500 (CDT)


Some time back, I found out that Linux didn't seem to support the
mincore() function, and checking various mailing list archives and
FAQs doesn't seem to indicate any discussion of it.

So, I guess I'll ask a relatively simple question -
is mincore() support planned? (and if no, why not?)

For those not familiar with mincore(), it's one of the functions that
sometimes accompanies mmap - it tells you which pages are "in core"
from the set that you give it. The prototype for it looks like:
int mincore(const void *addr, size_t len, char *vec)

So, you give it a start address and a number of bytes. It fills the
entries in vec with zero/nonzero (one per page), indicating memory
residency. FreeBSD, Solaris, and AIX have it. Linux and Tru64 don't.

The reason this function is interesting to me is that I've got a
high-performance web server that uses it when available. When the main
server process detects that file pages aren't in memory, it has a
helper process load them from disk. Using mincore() allows the server
to avoid using heuristics for guessing what pages are in memory.

The server code is available if anyone wants to play with it while
developing a mincore function - http://www.cs.rice.edu/~vivek/flash/
The server might also be of interest to people who evangelize Linux
in benchmark results - on FreeBSD, it's about twice as fast as Apache
for static content.

Thanks,
Vivek

-
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/