From owner-freebsd-hackers Thu Feb 15 05:07:21 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA29337 for hackers-outgoing; Thu, 15 Feb 1996 05:07:21 -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 FAA29329 for ; Thu, 15 Feb 1996 05:07:03 -0800 (PST) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id OAA07491 for hackers@freebsd.org; Thu, 15 Feb 1996 14:02:41 +0100 From: Luigi Rizzo Message-Id: <199602151302.OAA07491@labinfo.iet.unipi.it> Subject: Paging questions To: hackers@freebsd.org Date: Thu, 15 Feb 1996 14:02:41 +0100 (MET) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@freebsd.org Precedence: bulk More questions/thoughts on paging support for small-memory system. First, a preliminary question: How expensive is it to get a page fault which immediately returns without doing anything (lets call this a Quick Fault) ? According to the 4.3BSD book, I believe this is what was used on the VAX to simulate the 'reference' bit for a page. The x86 supports this in hardware (the DIRTY bit) so we do not have such a need. However I would not expect this kind of operation to be very expensive. And now a couple of questions/ideas: 1) Assume a page is swapped to disk, then copied back in core, and not modified afterwards. Do we keep a reference to the disk block for the page, so as to save subsequent pageouts ? Do we have an idea on how frequently this occurs ? I have no data on this. 2) Can we make DATA pages shared, CopyOnWrite more or less as text pages ? The idea is to consider DATA page readonly when they are first loaded, and make them shared. At the first write access, the page is either copied or (if there is only one process referencing it) transformed into a RW page -- this should be the way COW works. This could be useful in the following cases: - "undump"-ed programs; - "crunched" executables - shared libraries I have to admit I don't know if this can be really useful. A quick check on my system shows that many standard binaries and libraries only use 1-2 pages of DATA and so this is not going to save much memory. However, it should not introduce a significant overhead in the system (an additional Quick Fault in all those cases a DATA page would be copied from disk). Thanks 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/ ====================================================================