Re: Out Of Memory in v. 2.1

Brandon S. Allbery KF8NH (allbery@kf8nh.apk.net)
Sun, 04 Oct 1998 20:33:58 -0300


In message <6v8rfc$8jt@pell.pell.portland.or.us>, david parsons writes:
+-----
| That's one thing I've always wondered about. Why not have the system
| keep track of total memory instead of wanting to mirror memory onto
| swap? It seems to me that if you have 512mb of core and 128mb of
| swap that you've got 640mb of memory and you should be able to do
| allocations against that, since either a page will be in core or
| on the swap device.
+--->8

And if you could treat swap identically with main memory (i.e. access data
directly in swap), that would make sense. Problem is, swap has to be loaded
into main memory to be accessed... so now you need to reserve blocks of main
memory so you have places for swap pages to go. (There is no way to
simultaneously copy a page out to swap and reload it from another block, so
you have to reserve free space for this.)

In effect this is the same problem "in reverse" --- and trying to make it
work leads you to the same kind of situation we have now, except that now it
looks like "RAM overcommit" (= no space to page swap in to) instead of "swap
overcommit" (= no space to page RAM out to). And, swap being more plentiful
and generally cheaper than RAM, no-overcommit is not an option.

(And I'm sure the MM experts all fainted at my attempts at description....)

-- 
brandon s. allbery	[os/2][linux][solaris][japh]	 allbery@kf8nh.apk.net
system administrator	     [WAY too many hats]	   allbery@ece.cmu.edu
electrical and computer engineering					 KF8NH
carnegie mellon university

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/