public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David CHAMPELOVIER" <david@champelovier.com>
To: <linux-kernel@vger.kernel.org>
Subject: "heuristic overcommit" and fork()
Date: Wed, 11 Feb 2009 20:26:32 +0100	[thread overview]
Message-ID: <ED3886372DB5491AAA799709DBA78F6F@david> (raw)

Hi,

Recently, I was unable to fork() a 38 GB process on a system with 64 GB RAM
and no swap.
Having a look at the kernel source, I surprisingly found that in "heuristic
overcommit" mode, fork() always checks that there is enough memory to
duplicate process memory.

As far as I know, overcommit was introduced in the kernel for several
reasons, and fork() was one of them, since applications often exec() just
after fork(). I know fork() is not the most judicious choice in this case,
but well, this is the way many applications are written.

Moreover, I can read in the proc man page that in "heuristic overcommit
mode", "obvious overcommits of address space are refused". I do not think
fork() is an obvious overcommit, that's why I would expect fork() to be
always accepted in this mode.

So, is there a reason why fork() checks for available memory in "heuristic
mode" ?

Thanks in advance.

--
David Champelovier


             reply	other threads:[~2009-02-11 19:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11 19:26 David CHAMPELOVIER [this message]
2009-02-13  1:36 ` [PATCH] fix vmaccnt at fork (Was Re: "heuristic overcommit" and fork()) KAMEZAWA Hiroyuki
2009-02-16 14:32   ` Mel Gorman
2009-02-17  0:08     ` KAMEZAWA Hiroyuki

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=ED3886372DB5491AAA799709DBA78F6F@david \
    --to=david@champelovier.com \
    --cc=linux-kernel@vger.kernel.org \
    /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