Subject: Re: uvm & flushing
To: Chuck Silvers <>
From: Jason Thorpe <>
List: tech-kern
Date: 12/14/1999 16:42:46
On Tue, 14 Dec 1999 16:35:42 -0800 
 Chuck Silvers <> wrote:

 > the count of dirty pages is only possible if you know that no pages are
 > mapped.  mapped pages can become dirty without the kernel being notified.
 > the concept doesn't really work very well.

Not if you write-protect the pages... like a COW-type thing, except it
doesn't cause a COW to happen, just for the pages to be marked dirty.

However, this could have bad interactions with wired pages.  Sigh.

Another option would be to use pmap_is_modified() ... flushing the pages
before the archive process begins will clear the modified attribute, and
you could just lock the object and check all the pages again after the
archive process completes... This should work, since pmap_is_modified()
*has* to work in order for the VM system to function properly.

        -- Jason R. Thorpe <>