Subject: Re: UVM optimalisations / remarks
To: Ignatios Souvatzis <is@netbsd.org>
From: Charles M. Hannum <abuse@spamalicious.com>
List: tech-kern
Date: 03/26/2002 21:35:19
> "How"? The modified bits I'm familiar with are implemented in the fault trap
> handlers... which architectures have hardware implemented modified bits?
Uh, the question is irrelevant.
In the completely simple approach, you add a line of code whereever
you call pmap_is_modified(). If it returns true, you clear the
"zeroed" flag (call it PG_ZEROED for now). This is particularly easy
since, in most cases (if not all), we already have to clear PG_CLEAN.
If a page is clean and "zeroed" when we see it on the inactive list,
we can just toss it and re-zfod it in the future.
Whether the "modified" bit is done in hardware or by emulation makes
no difference at all.