Messages in this thread | | | Date | Mon, 6 Mar 2000 16:11:41 +0000 (GMT Standard Time) | From | Paul Jakma <> | Subject | Re: Linux 2.2.15pre12 |
| |
On Mon, 6 Mar 2000, Gregory Maxwell wrote:
> On Mon, 6 Mar 2000, Paul Jakma wrote: > > > another question, forgive me if it's stupid: Why do we even allow > > overcommited memory? What reason is there is to support app's that > > malloc() a huge amount of memory without using that memory? > [snip] > > This isn't the only case. Linux uses COW paging on fork. I.e. if an app
i understand this. and i'm wondering would it possible to turn off overcommit, yet still keep the COW behaviour? eg it should be possible to mark pages in swap as used in a kernel table, without actually writing to them yet. ie if we have x pages of swap available, on fork decrement the available pages of swap. Then later on when at the point the process actually dirties the page the kernel could whatever more extensive housekeeping is needed.
i suppose i'm talking about better accounting, and having swap == backing store, amn't i?
> forks, it doesn't get a seperate copy of pages until it writes to them. > This is a termendous speed increase (no copies until needed, cache, etc) > and quite a bit of memory savings, but you lose this memory saving if you > turn off overcommit. >
as i understand you can't turn off overcommit in linux at the moment. Yet it would be a useful option to have. I can easily imagine certain situations where i would choose to turn off overcommit at the expense of more swap if it would guarantee that OOM would never happen. (hard disk space is cheap compared to downtime)
actually: if i configure linux with swap == address space now, would this guarantee that OOM would never happen? ie on ia32, would 2GB of swap be effectively equivalent to backing store?
regards,
Paul Jakma.
- 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/
| |