Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 1996 09:27:17 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        toor@dyson.iquest.net (John S. Dyson)
Cc:        dufault@hda.com, hackers@FreeBSD.ORG
Subject:   Zero Fill On Demand (was Re: Compressed RAM/SWAP)
Message-ID:  <199602120827.JAA00762@labinfo.iet.unipi.it>
In-Reply-To: <199602101238.MAA03889@dyson.iquest.net> from "John S. Dyson" at Feb 10, 96 12:37:56 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > If there are lots of zero'd pages that aren't used that often,
> > can't be eliminated, and would benefit from compression wouldn't
> > it be better to look at a ZFOD (zero fill on demand) mechanism?
>
> Perhaps using that as a HINT as to which pages might be useful targets
> for compression???  Maybe eliminating the wasteful attempted compression.

One possible way to achieve ZFOD would be the following:

+ make sure that there is always a bzeroed page, say ZP
+ when creating a new page, just build a copy-on-write reference to ZP
  in the page table.

this should be quite fast at creation (and implementation) time,
and a bit more powerful than ZFOD, as the page is read-accessible
from the beginning without any page fault.

I believe it is going to be more expensive when the page is written
to, because copying require twice the accesses of bzero-ing.

John ?

	Luigi
====================================================================
Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it       Universita' di Pisa
tel: +39-50-568533              via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522              http://www.iet.unipi.it/~luigi/
====================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602120827.JAA00762>