From: Nicolas Devillard <ndevilla@mygale.org>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: linux-mm@kvack.org, Alan Cox <number6@the-village.bc.nu>
Subject: Re: memory overcommitment
Date: Wed, 19 Aug 1998 17:17:41 +0000 ( ) [thread overview]
Message-ID: <Pine.LNX.4.02.9808191639510.7138-100000@pc367.hq.eso.org> (raw)
In-Reply-To: <199808191207.NAA00885@dax.dcs.ed.ac.uk>
On Wed, 19 Aug 1998, Stephen C. Tweedie wrote:
>
> Then initialise the memory after malloc; you know the pages are there by
> that stage.
That is no solution. Futhermore, if other processes are also touching
overcommitted memory, the initialization might just crash the machine.
What I'm saying is: if malloc() does not tell me it has a tough life
finding free memory, and just returns space generously, I have no way to
know it by myself (at least: no safe way).
What about a system call just before a series of malloc() to tell the OS
you are actually going to use this allocated memory?
This could even be set as a default for machines used as number-crunchers,
you will need lots of RAM and disk space on these anyway.
> There are also lots of programs which allocate a gig of memory and only
> use a tiny fraction of it. We don't want them all to suddenly start
> failing. You can't have it both ways!
Hard to believe there is no way to have both. Simply because a memory
allocation done by a forking Netscape is not the same as one done by a
developper in need of memory to process data. At least give a developper a
chance to ensure the promised memory is really there! :-)
> Umm, killing inetd? sendmaild? init??!!
Killing processes does not look like a solution. My feeling is: you are
entering an endless world full of nightmares if you want to implement an
intelligent daemon trying to figure out how to kill user processes.
Everyone has different requirements about how to do that, and you will
have a hard time putting this up in a simple way for the sysadmin to set
it up correctly (if there is any way to do that). Looks like a dead-end.
Let me try to put up user requirements on that one:
- when I get allocated memory, I must be sure that it is really
allocated and not faked, because I am 100% sure that I will use it.
Because I know that in advance, it should not be too hard to
communicate it to the OS by any system call or resource parameter you
wish.
- if no more memory is available, I would like to get a message or a
signal or whatever, telling me (politely :-) that I'm too greedy. This
way, I know what to do: kill all netscapes, xemacs, even X if I really
need memory, or buy more RAM, make more swap, etc. I do not fell that
kind of decision should not be taken on the fly by any automatic
procedure (especially to buy some RAM, I like to go by myself :-).
Cheers
Nicolas
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
prev parent reply other threads:[~1998-08-19 17:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-08-17 8:46 Nicolas Devillard
1998-08-17 18:33 ` Stephen C. Tweedie
1998-08-18 15:52 ` Chris Atenasio
1998-08-19 12:08 ` Stephen C. Tweedie
1998-08-18 16:34 ` Nicolas Devillard
1998-08-19 12:07 ` Stephen C. Tweedie
1998-08-19 17:17 ` Nicolas Devillard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.02.9808191639510.7138-100000@pc367.hq.eso.org \
--to=ndevilla@mygale.org \
--cc=linux-mm@kvack.org \
--cc=number6@the-village.bc.nu \
--cc=sct@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox