public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* "heuristic overcommit" and fork()
@ 2009-02-11 19:26 David CHAMPELOVIER
  2009-02-13  1:36 ` [PATCH] fix vmaccnt at fork (Was Re: "heuristic overcommit" and fork()) KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 4+ messages in thread
From: David CHAMPELOVIER @ 2009-02-11 19:26 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-17  0:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-11 19:26 "heuristic overcommit" and fork() David CHAMPELOVIER
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox