Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Feb 1996 14:02:41 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        hackers@freebsd.org
Subject:   Paging questions
Message-ID:  <199602151302.OAA07491@labinfo.iet.unipi.it>

next in thread | raw e-mail | index | archive | help
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/
====================================================================



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