* [Linux-ia64] Re: [PATCH] Increase size of user stack
2003-05-05 18:25 [Linux-ia64] Re: [PATCH] Increase size of user stack David Mosberger
@ 2003-05-12 14:38 ` Martin Hicks
2003-05-12 14:44 ` Matthew Wilcox
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Martin Hicks @ 2003-05-12 14:38 UTC (permalink / raw)
To: linux-ia64
On Mon, May 05, 2003 at 11:25:33AM -0700, David Mosberger wrote:
> >>>>> On Mon, 5 May 2003 14:18:52 -0400, Martin Hicks <mort@wildopensource.com> said:
>
> Martin> The current user stack size limit of 2GB is not big enough
> Martin> for large SMP or SSI clusters. The following patch
> Martin> increases this size from 2GB to 512GB. The new size is
> Martin> negotiable, but right now SGI has programs that require over
> Martin> 100GB of stack size on a 64 processor machine. Setting the
> Martin> user stack size to 512GB seems like a reasonable thing to do
> Martin> for future growth.
>
> Why not make it configurable via setrlimit() and be done with it once
> and for all?
(sorry for taking so long to respond about this)
The user stack size is configurable through setrlimit(). The default
size of the user stack is 8MB and the max is ~0UL. The problem is
the addreses that are chosen for the stack (which grows down) and the
register backing store (which grows up) are only 2GB apart. My patch
simply makes this space 512GB so that large stack are possible, without
the stack smashing into the RBS.
mh
--
Wild Open Source Inc. mort@wildopensource.com
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] Re: [PATCH] Increase size of user stack
2003-05-05 18:25 [Linux-ia64] Re: [PATCH] Increase size of user stack David Mosberger
2003-05-12 14:38 ` Martin Hicks
@ 2003-05-12 14:44 ` Matthew Wilcox
2003-05-12 14:59 ` Martin Hicks
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Matthew Wilcox @ 2003-05-12 14:44 UTC (permalink / raw)
To: linux-ia64
On Mon, May 12, 2003 at 10:38:44AM -0400, Martin Hicks wrote:
> On Mon, May 05, 2003 at 11:25:33AM -0700, David Mosberger wrote:
> > Martin> The current user stack size limit of 2GB is not big enough
> > Martin> for large SMP or SSI clusters. The following patch
> > Martin> increases this size from 2GB to 512GB. The new size is
> > Martin> negotiable, but right now SGI has programs that require over
> > Martin> 100GB of stack size on a 64 processor machine. Setting the
> > Martin> user stack size to 512GB seems like a reasonable thing to do
> > Martin> for future growth.
> >
> > Why not make it configurable via setrlimit() and be done with it once
> > and for all?
>
> (sorry for taking so long to respond about this)
>
> The user stack size is configurable through setrlimit(). The default
> size of the user stack is 8MB and the max is ~0UL. The problem is
> the addreses that are chosen for the stack (which grows down) and the
> register backing store (which grows up) are only 2GB apart. My patch
> simply makes this space 512GB so that large stack are possible, without
> the stack smashing into the RBS.
Yes, but why not choose the addresses based on the current setting of
current->rlim[RLIMIT_STACK].rlim_max? We could default that setting to
2GB (ie the same as what people are using now) and then set the RBS and
the user stack min(1TB, current->rlim[RLIMIT_STACK].rlim_max) apart.
Are there any disadvantages to doing this?
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] Re: [PATCH] Increase size of user stack
2003-05-05 18:25 [Linux-ia64] Re: [PATCH] Increase size of user stack David Mosberger
2003-05-12 14:38 ` Martin Hicks
2003-05-12 14:44 ` Matthew Wilcox
@ 2003-05-12 14:59 ` Martin Hicks
2003-05-12 15:03 ` Matthew Wilcox
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Martin Hicks @ 2003-05-12 14:59 UTC (permalink / raw)
To: linux-ia64
On Mon, May 12, 2003 at 03:44:17PM +0100, Matthew Wilcox wrote:
> On Mon, May 12, 2003 at 10:38:44AM -0400, Martin Hicks wrote:
> > >
> > (sorry for taking so long to respond about this)
> >
> > The user stack size is configurable through setrlimit(). The default
> > size of the user stack is 8MB and the max is ~0UL. The problem is
> > the addreses that are chosen for the stack (which grows down) and the
> > register backing store (which grows up) are only 2GB apart. My patch
> > simply makes this space 512GB so that large stack are possible, without
> > the stack smashing into the RBS.
>
> Yes, but why not choose the addresses based on the current setting of
> current->rlim[RLIMIT_STACK].rlim_max? We could default that setting to
> 2GB (ie the same as what people are using now) and then set the RBS and
> the user stack min(1TB, current->rlim[RLIMIT_STACK].rlim_max) apart.
> Are there any disadvantages to doing this?
Maybe I'm missing something, but what happens if a process is created
using the default 2GB between the RBS and the stack and sometime
later the process does a setrlimit to 100GB of stack. How do the
stack and RBS get moved around to make enough room between the two
start addresses?
mh
--
Wild Open Source Inc. mort@wildopensource.com
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] Re: [PATCH] Increase size of user stack
2003-05-05 18:25 [Linux-ia64] Re: [PATCH] Increase size of user stack David Mosberger
` (2 preceding siblings ...)
2003-05-12 14:59 ` Martin Hicks
@ 2003-05-12 15:03 ` Matthew Wilcox
2003-05-12 15:36 ` Andreas Schwab
2003-05-12 19:10 ` David Mosberger
5 siblings, 0 replies; 7+ messages in thread
From: Matthew Wilcox @ 2003-05-12 15:03 UTC (permalink / raw)
To: linux-ia64
On Mon, May 12, 2003 at 10:59:38AM -0400, Martin Hicks wrote:
> Maybe I'm missing something, but what happens if a process is created
> using the default 2GB between the RBS and the stack and sometime
> later the process does a setrlimit to 100GB of stack. How do the
> stack and RBS get moved around to make enough room between the two
> start addresses?
They don't. However, the new maximum would take effect for any newly
created children.
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Linux-ia64] Re: [PATCH] Increase size of user stack
2003-05-05 18:25 [Linux-ia64] Re: [PATCH] Increase size of user stack David Mosberger
` (3 preceding siblings ...)
2003-05-12 15:03 ` Matthew Wilcox
@ 2003-05-12 15:36 ` Andreas Schwab
2003-05-12 19:10 ` David Mosberger
5 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2003-05-12 15:36 UTC (permalink / raw)
To: linux-ia64
Matthew Wilcox <willy@debian.org> writes:
|> On Mon, May 12, 2003 at 10:59:38AM -0400, Martin Hicks wrote:
|> > Maybe I'm missing something, but what happens if a process is created
|> > using the default 2GB between the RBS and the stack and sometime
|> > later the process does a setrlimit to 100GB of stack. How do the
|> > stack and RBS get moved around to make enough room between the two
|> > start addresses?
|>
|> They don't. However, the new maximum would take effect for any newly
|> created children.
But setrlimit takes effect immediately, not only for newly created
children.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 7+ messages in thread* [Linux-ia64] Re: [PATCH] Increase size of user stack
2003-05-05 18:25 [Linux-ia64] Re: [PATCH] Increase size of user stack David Mosberger
` (4 preceding siblings ...)
2003-05-12 15:36 ` Andreas Schwab
@ 2003-05-12 19:10 ` David Mosberger
5 siblings, 0 replies; 7+ messages in thread
From: David Mosberger @ 2003-05-12 19:10 UTC (permalink / raw)
To: linux-ia64
>>>>> On Mon, 12 May 2003 10:38:44 -0400, Martin Hicks <mort@wildopensource.com> said:
Martin> The user stack size is configurable through setrlimit().
Martin> The default size of the user stack is 8MB and the max is
Martin> ~0UL. The problem is the addreses that are chosen for the
Martin> stack (which grows down) and the register backing store
Martin> (which grows up) are only 2GB apart. My patch simply makes
Martin> this space 512GB so that large stack are possible, without
Martin> the stack smashing into the RBS.
OK, time for a pop-quiz:
Q: You are faced with a timebomb that's set to go of in 1 minute.
What do you do?
(a) Tweak the timer so it goes off in ~4 1/4 hours instead and get
the hell out of town.
(b) Remove the timing device so it doesn't go off at all.
If you're answer is (a), I'm afraid you stand an excellent chance of
getting voted off the island.
Clear enough? ;-)
--david
^ permalink raw reply [flat|nested] 7+ messages in thread