From owner-freebsd-hackers Mon Feb 12 00:36:56 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA08631 for hackers-outgoing; Mon, 12 Feb 1996 00:36:56 -0800 (PST) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA08612 for ; Mon, 12 Feb 1996 00:36:49 -0800 (PST) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id JAA00762; Mon, 12 Feb 1996 09:27:17 +0100 From: Luigi Rizzo Message-Id: <199602120827.JAA00762@labinfo.iet.unipi.it> Subject: Zero Fill On Demand (was Re: Compressed RAM/SWAP) To: toor@dyson.iquest.net (John S. Dyson) Date: Mon, 12 Feb 1996 09:27:17 +0100 (MET) Cc: dufault@hda.com, hackers@FreeBSD.ORG In-Reply-To: <199602101238.MAA03889@dyson.iquest.net> from "John S. Dyson" at Feb 10, 96 12:37:56 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@FreeBSD.ORG Precedence: bulk > > 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/ ====================================================================