Re: mremap()

Stephen C. Tweedie (sct@redhat.com)
Fri, 18 Dec 1998 23:16:00 GMT


Hi,

On Fri, 18 Dec 1998 12:58:06 -0800, "Jay Nordwick"
<nordwick@scam.XCF.Berkeley.EDU> said:

>> Linux supports a number of
>> VM optimisations not found elsewhere, such as mremap() to map an
>> existing set of pages elsewhere in the VM (giving kernel support to
>> realloc(3), for example).

> Out of curiosity, how much of a gain is this?

Good question. I don't have hard data, but I'm told that in a few cases
(X being a major one), it is a significant win. We simply don't perform
the optimisation for small regions, anyway.

Personally, I have got a scientific simulation application which
allocates large log arrays. Rather than trying to predict in advance
how large they will grow, I just realloc them every so often doubling
their size each time. Once they grow to several MB, I am certain that
kernel mremap support is making a difference, especially if most of the
log is in swap by this stage!

--Stephen

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