Subject: Re: Replacement for grep(1) (part 2)
To: Matthew Dillon <>
From: Jason Thorpe <>
List: tech-userlevel
Date: 07/13/1999 11:32:31
On Tue, 13 Jul 1999 11:13:49 -0700 (PDT) 
 Matthew Dillon <> wrote:

 >     SysV was totally and utterly broken in regards to swap allocation.  The
 >     only major operating system that used it as a base was IRIX and SGI
 >     found out very quickly that pre-reserving swap is a stupid idea - and
 >     so they implemented 'virtual swap' to get around it in 5.3, and moved the
 >     whole thing to an overcommit model in 6.4.  Doh!  Even solaris doesn't
 >     overcommit - you think it actually reserves data blocks for its file-backed
 >     swap?  Bzzt!  It uses an overcommit model too.

You don't have to reserve the actual swap blocks.  you merely have to
know how many blocks total there are, and how many swap backed pages
you have.  you can certainly dynamically assign the actual swap blocks,
for e.g. swap clustering, etc.  it's really not that hard.

In the case of swapping to files, NetBSD, at least, doesn't allow swapping
to sparse files.  The data blocks in the swap file must exist and be
allocated to that file.

        -- Jason R. Thorpe <>