Re: mergemem: announce & design issues

Stephen Williams (steve@icarus.icarus.com)
Wed, 18 Mar 1998 09:18:30 -0800


Jacques Gelinas wrote:
>> The logic of mergemem is
> that if you start several instance of a given program, there is a good bet
> that some memory will be initialised exactly the same. So mergement is
> comparing different instance of a program and find all the identical
> pages. Then it puts those page read-only and merge all process to share
> the same physical page. It also puts the page with the copy-on-write
> flag so a process can still continue to modify the page, if needed later.

Just curious, but couldn't one load a process with the data section shared
and copy-on-write the instant a program is loaded? Isn't it true that the
data section can be paged out of the executable file until it is written to?
(Zero-filled pages are initially shared anyhow.)

I'm a little surprised that Linux doesn't do this, or does it? And if not,
would doing it get some of the benefits of mergemem without the runtime
overhead?

-- 
Steve Williams                "The woods are lovely, dark and deep.
steve@icarus.com              But I have promises to keep,
steve@picturel.com            and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu