Re: Overcommitable memory??

From: Rask Ingemann Lambertsen (rask@kampsax.k-net.dk)
Date: Mon Mar 13 2000 - 02:11:26 EST


Den 13-Mar-00 03:44:36 skrev Mitchell Blank Jr fĝlgende om "Re: Overcommitable memory?? Re: Some questions about linux kernel.":

>> I mean, nobody tolerates their filesystem overcommitting blocks it
>> doesn't have (or maybe they do and my reality is a myth).

> Your reality IS a myth. If you have a sparse file, you can run out
> of disk space while writing in the middle of it.

   The file system does not overcomming blocks, it just allocates blocks in
a way that can leave holes in the file. If there are no more free blocks
left, write() will return -1 with errno set to indicate the reason for the
failure. Correctme if I'm wrong, but AFAIK the file system doesn't start
deleting files at (more or less) random when it runs out of space.

> To make a functioning machine with absolutely NO overcommit would probably
> require gigabytes of swap which would never be used, just to back the
> stack pages and COW pages of all the processes. Plus, there's no real
> gain to be had.

   Sure there is. Apps would be told that the system is out of memory
instead of just getting a SIGKILL'ed out of the blue sky. Apps getting NULL
from malloc() can react appropriately, such as saving your files to disk,
trying again a little later or just exiting if that is acceptable for what
the app was doing. Apps getting SIGKILL will take your unsaved work with
them in the fall.

Regards,

/ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻTŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\
| Rask Ingemann Lambertsen | E-mail: mailto:rask@kampsax.dtu.dk |
| Please do NOT Cc: to me or the | WWW: http://www.gbar.dtu.dk/~c948374/ |
| mailing list. I am on the list.| "ThrustMe" on XPilot, ARCnet and IRC |
| Reality is that which, when you stop believing in it, it still exists. |

-
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/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:23 EST