Subject: Re: ffs fragmentation
To: Mike Cheponis <mac@Wireless.Com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 05/16/1999 16:27:25
On Sat, May 15, 1999 at 03:01:33PM -0700, Mike Cheponis wrote:
> Think of applications that use algorithm similar to chess-playing programs
> go deep and wide in their searches, and it's unknown at the outset how much
> dynamic memory will be required.
> 
> It seems to me silly and antiquated to have a "fixed" swap.
> 
> The suggestion to open a file as swap is better, but still does not do
> what I want, which is something like this:
> 
> 
> char big[9876543210]; /* That's 9.876.543.210 bytes */
> void main(){
>   big[ ] = foo;
> }
> 
> or, even better:
> 
> 
> void main(){
>   char big[9876543210]; /* That's 9.876.543.210 bytes */
>   big[ ] = foo;
> }
> 
> 
> In the second case, it's stack space that's used.

Ok. So imagine we support Dynaswap, and you have 10G free on our HD.
A user starts such a program, and you want to install emacs. How
surprinsing, there's not enouth free space.
Second senario: A user ftp'd 10G of MP3 files. You can't start your program
any more.

So you need to be able to reserve some space for swap, which will not be used
for files, and some space for filesystem, which will not be used for swap,
if you want to be sure you'll always have enouth resources. And you can't rely
on space that can be used for both, because you'll never be sure they will 
be free when you need it. I'd qualify such space "wasted".
So I can't see how this will be different from 2 separate partitions.

> 
> IMHO, an OS should provide the proper support to handle the
> above-mentioned cases.
> 

We do. If you need 10G of VM, just make a 10G (or bigger) swap partition.
I can't see how different it is from enforcing that you'll ever have
10G free on your filesystem.

--
Manuel Bouyer <bouyer@antioche.eu.org>
--