Subject: Re: further vm adventures: Ah, found!
To: Chuck Cranor <chuck@dworkin.wustl.edu>
From: None <jiho@postal.c-zone.net>
List: tech-kern
Date: 05/01/1998 19:36:30
On 28-Apr-98 Chuck Cranor wrote:

> the result of this program with the NetBSD 1.3 Mach VM iS:
> START:      4019 pages active
> AFTER MMAP 100 PAGES:      4119 pages active
> AFTER MUNMAP 99 of 100 PAGES:      4119 pages active
> AFTER MUNMAP OF FINAL PAGE:      4019 pages active
>
>
> note that I have addressed this issue with UVM, so UVM will report:
> START:       676 pages active
> AFTER MMAP 100 PAGES:       776 pages active
> AFTER MUNMAP 99 of 100 PAGES:       677 pages active
> AFTER MUNMAP OF FINAL PAGE:       676 pages active

I just compiled your test program, and ran it under two similar NetBSD 1.2
kernels:  one with the old Mach vm behavior, and one patched to free the surplus
pages.  While I wouldn't trust my hack as far as I could throw it yet, my runs
of your test show that the old Mach vm _can_ be successfully patched to plug
this leak.

In addition I did a slightly rewritten version, which uses malloc/realloc/free
instead of mmap/munmap/mnumap, and got similar results.

But your active page figures for the test under NetBSD 1.3 are rather high,
don't you think?  My figures under NetBSD 1.2 -- with either behavior -- start
several pages lower than yours with UVM.

I wouldn't want to think you're leveraging this to over-promote UVM.... ;)


--Jim Howard  <jiho@mail.c-zone.net>


----------------------------------
E-Mail: jiho@mail.c-zone.net
Date: 01-May-98
Time: 19:36:30

This message was sent by XFMail
----------------------------------