[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070316144342.GF355@devserv.devel.redhat.com>
Date: Fri, 16 Mar 2007 09:43:42 -0500
From: Jakub Jelinek <jakub@...hat.com>
To: Hugh Dickins <hugh@...itas.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Dan Aloni <da-x@...atomic.org>, linux-kernel@...r.kernel.org
Subject: Re: thread stacks and strict vm overcommit accounting
On Thu, Mar 15, 2007 at 11:08:40PM +0000, Hugh Dickins wrote:
> > appears to increase Committed_AS by around 200kb. But we've committed to
> > providing it with 8MB for stack.
> >
> > How come this is correct?
>
> We've no more committed to providing each instance with 8MB of stack,
> than we've committed to providing each instance with RLIMIT_AS of
> address space. The rlimits are limits, not commitments, surely?
RLIMIT_STACK only applies to the initial thread, POSIX threads have just
stack size attribute, not maximum thread stack size attribute.
If you set it explicitly with pthread_attr_setstacksize, then libpthread
will honor whatever thread stack size you want, otherwise it just uses
some default thread stack size. This happens to be in NPTL derived
from RLIMIT_STACK value, but very well could be something else.
Jakub
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists