public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: Andrea Arcangeli <andrea@novell.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: heap-stack-gap for 2.6
Date: Wed, 29 Sep 2004 08:05:21 +0200	[thread overview]
Message-ID: <20040929060521.GA6975@devserv.devel.redhat.com> (raw)
In-Reply-To: <20040928221933.GG4084@dualathlon.random>

[-- Attachment #1: Type: text/plain, Size: 1915 bytes --]

On Wed, Sep 29, 2004 at 12:19:33AM +0200, Andrea Arcangeli wrote:
> On Tue, Sep 28, 2004 at 09:43:51PM +0200, Arjan van de Ven wrote:
> > On Mon, Sep 27, 2004 at 03:09:19PM +0200, Andrea Arcangeli wrote:
> > > > which "those apps" ?
> > > 
> > > those apps that wants to allocate as close as possible to the stack.
> > > They're already using /proc/self/mapped_base, the gap of topdown isn't
> > > configurable.
> > 
> > /proc/self/mmaped_base doesn't exist...
> 
> it does with this patch that should be included in mainline too. This
> follows the redhat API that oracle requires (you invented it, didn't
> you?) so you should be fine with it.

> with mapped base people is free to allocate as much memory as the
> hardware can, with topdown not.

oh? you mean that 1Mb gap between stack and topdown? Every ISV I talked to
said they could get more VA space with topdown than with the suse
mmaped_base hack... :)

> Yeah, map fix is map fixed and when you execute map fixed on a existing
> mapping becaue topdown moved below the 1G mark (a place where there
> could never have been a "hinted" mapping before), the existing mapping
> will be destroyed and the application will behave randomly.

MAP_FIXED is to be used only on things YOU mmaped before. 
> 
> isn't the whole point of topdown to gain ~1G more of RAM. A 1G area that
> couldn't possibly be used before

wrong; brk() is there which is also used by malloc() and internally by the C
library.

> mallocs. topdown breaks that assumption and can break random apps in
> random ways.

do you have proof for that?

 
> Or did I misunderstood something? If topdown still forbids you to use
> the first 1G of address space, then what's the point?!?

You missed that you can only use MAP_FIXED on mmaps YOU mmaped before.
That's true for basically all operating systems because the runtime
(including C library) is allowed to malloc, to brk(), to mmap etc etc.


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-09-29  6:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-25 16:22 heap-stack-gap for 2.6 Andrea Arcangeli
2004-09-25 23:57 ` Rik van Riel
2004-09-26  0:40   ` Andrea Arcangeli
2004-09-27  8:09 ` Arjan van de Ven
2004-09-27 13:09   ` Andrea Arcangeli
2004-09-28 19:43     ` Arjan van de Ven
2004-09-28 22:19       ` Andrea Arcangeli
2004-09-29  6:05         ` Arjan van de Ven [this message]
2004-09-29 14:11           ` Andrea Arcangeli
2004-09-29 14:24             ` Alan Cox
2004-09-29 15:44               ` Andrea Arcangeli
2004-09-29 14:25             ` Arjan van de Ven
2004-09-29 14:53               ` Andrea Arcangeli
2004-09-29 15:01                 ` Arjan van de Ven
2004-09-29 15:40                   ` Andrea Arcangeli
2004-09-28  6:25 ` Hui Huang
2004-09-28 14:19   ` Andrea Arcangeli
2004-09-29  8:42     ` Hui Huang
2004-09-29 14:23       ` Andrea Arcangeli
2004-09-29 22:01         ` Hui Huang
2004-10-12  0:51           ` Andrea Arcangeli

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=20040929060521.GA6975@devserv.devel.redhat.com \
    --to=arjanv@redhat.com \
    --cc=akpm@osdl.org \
    --cc=andrea@novell.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