About the free page pool

Scott Kaplan
2002-09-02T19:50:49Z

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yet another question as I try to get a clear picture of the nitty-gritty
details of the VM...

How important is it to maintain a list of free pages? That is, how
critical is it that there be some pool of free pages from which the only
bookkeeping required is the removal of that page from the free list.

In contrast, how awful would the following be: Keep no free list, but
instead ensure that some portion of the trailing end of the inactive list
contains clean pages that are ready to be reclaimed. When a free page is
needed, just unmap that clean, inactive page and use *that* as your free
page. Clearly some more bookkeeping is required to unmap the page (assume
that rmap is available to make that a straightforward task) than there
would be simply to remove the page from the free list. However, for every
page on the free list, that unmapping work had to happen previously anyway.
..

(Of course, the above scenario assumes that main memory is full. If there
are unused page frames, then certainly you would consult a list of those
first.)

Are there moments at which pages need to be allocated *so quickly* that
unmapping the page at allocation time is too costly? Or is there some
other reason for maintaining a free list that I'm completely missing?

Also, how large is the free list of pages now? 5% of the main memory
space? A fixed number of page frames?

As always, thanks for the feedback and insights.
Scott
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (Darwin)
Comment: For info see http://www.gnupg.org

iD8DBQE9c8Ed8eFdWQtoOmgRAm3BAJ9q8Fw2v2F2MtuM9xxuwB2FjuN9MgCeO7P/
C6TrxXqNKF07Po0msvHvoKg=
=qAZt
-----END PGP SIGNATURE-----