*BSD News Article 28202


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!sgiblab!cs.uoregon.edu!reuter.cse.ogi.edu!netnews.nwnet.net!ns1.nodak.edu!plains.NoDak.edu!tinguely
From: tinguely@plains.NoDak.edu (Mark Tinguely)
Subject: Re: Notes on the *new* FreeBSD V1.1 VM system
Sender: usenet@ns1.nodak.edu (Usenet login)
Message-ID: <CMELM7.vHy@ns1.nodak.edu>
Date: Wed, 9 Mar 1994 15:27:42 GMT
References: <CLutBp.4K9@flatlin.ka.sub.org> <RA0Jn4G.dysonj@delphi.com> <2kudpoINNbhd@CS.UTK.EDU>
Nntp-Posting-Host: plains.nodak.edu
Organization: North Dakota State University
Lines: 31

In article <2kudpoINNbhd@CS.UTK.EDU> moore@cs.utk.edu writes:

>I don't think this is that hard...all you need is a count of the
>number of unallocated pages of swap space.  When someone allocates
>more pages, you decrement the count; if there's not enough room, fail.
>When pages are freed, you add them back to the available page count.
>The performance impact is minimal except perhaps on multiprocessor
>systems where you have to get exclusive access to the counter.

I have been thinking of something like this for a long time (I was too busy
last few months to do anything). But instead of counting just backstore, also
count a good percentage of available RAM also in the calculation (not all
available RAM still want to leave some room for text). In the mailling list,
it was discussed and agreeded that the allocation of structures and the user
allocation of stack should be considered in a different manner (user allocation
of stack should fail sooner than say the forking of a process for example).

I also have the radical idea that the swap page should be removed from the
backstore when brought back into the system (the page to be put back to the
backstore may not be the same next time things are depleted). I already run
that here and have been able to extend the point of hanging on my 8 megs
RAM 5 Meg swap machine (okay, stupid VM amount but the machine lacks disk
and it does find the problems!). Counters show excessive most pages get
modified when were pulled back in, so they needed to be re-written anyway.
The reason I say it is a "radical" idea is that many do not think this is
wise because it can slow things down (when the page is read an not modified)
and they want the back store to be a sort of cache. I still am convinced that
this removal is the correct operation especially if we do true swaps of
processes which forces the user structure to the backstore.

--mark.