This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Linuxthreads stack size on ia64


Andreas Schwab <schwab@suse.de> writes:

> The default thread stack size in linuxthreads is 2MB.  This is pretty
> small for a 64 bit system, and on the ia64 this is even divided between
> the processor stack and the register stack.  This patch enlages the size
> to 64MB on ia64.  This should perhaps be changed for other 64bit targets
> as well.

I don't think this is a good idea.  The problem is that all the page
for the stack are allocated at once.  The lazy allocation with the
automatic stack growing cannot be used.  Therefore such an increase
has pretty big consequences.

I would agree that a 64 bit architecture should probably have twice
the stack size (so 4MB).  For IA-64 I haven't seen any numbers
suggesting that the two stack require each 4MB.  Remember, the
register stack content is places on the normal stack on other systems
so it's not an additional requirement.

Where I do agree there is a problem is that we are currently using
STACK_SIZE for two purposes: to limit the total stack size the user
can set and to determine the default stack size in case on attribute
is available at thread creation time.

I would have not problem whatsoever for separate the two uses for
platforms with a thread register and make the maximum stack size the
user can select much bigger.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]