All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc: remove _STK_LIM_MAX override
@ 2014-04-27 20:20 John David Anglin
  2014-04-27 22:41 ` Carlos O'Donell
  0 siblings, 1 reply; 2+ messages in thread
From: John David Anglin @ 2014-04-27 20:20 UTC (permalink / raw
  To: linux-parisc List; +Cc: Helge Deller, James Bottomley

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

There are only a couple of architectures that override _STK_LIM_MAX to  
a non-infinity value.
This changes the stack allocation semantics in subtle ways.  For  
example, make changes its
stack allocation to the hard maximum defined by _STK_LIM_MAX.  As a  
results, threads executed
by processes running under make are allocated a stack size of  
_STK_LIM_MAX rather than
a sensible default value.  This causes various thread stress tests to  
fail when they can't muster
more than about 50 threads.

The attached change implements the default behavior used by the  
majority of architectures.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
---


[-- Attachment #2: resource.d.txt --]
[-- Type: text/plain, Size: 380 bytes --]

diff --git a/arch/parisc/include/uapi/asm/resource.h b/arch/parisc/include/uapi/asm/resource.h
index 8b06343..090483c 100644
--- a/arch/parisc/include/uapi/asm/resource.h
+++ b/arch/parisc/include/uapi/asm/resource.h
@@ -1,7 +1,6 @@
 #ifndef _ASM_PARISC_RESOURCE_H
 #define _ASM_PARISC_RESOURCE_H
 
-#define _STK_LIM_MAX	10 * _STK_LIM
 #include <asm-generic/resource.h>
 
 #endif

[-- Attachment #3: Type: text/plain, Size: 45 bytes --]



--
John David Anglin	dave.anglin@bell.net


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

* Re: [PATCH] parisc: remove _STK_LIM_MAX override
  2014-04-27 20:20 [PATCH] parisc: remove _STK_LIM_MAX override John David Anglin
@ 2014-04-27 22:41 ` Carlos O'Donell
  0 siblings, 0 replies; 2+ messages in thread
From: Carlos O'Donell @ 2014-04-27 22:41 UTC (permalink / raw
  To: John David Anglin; +Cc: linux-parisc List, Helge Deller, James Bottomley

On Sun, Apr 27, 2014 at 4:20 PM, John David Anglin <dave.anglin@bell.net> wrote:
> The attached change implements the default behavior used by the majority of
> architectures.
>
> Signed-off-by: John David Anglin <dave.anglin@bell.net>

Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>

I have reviewed the kernel code to make sure this does what's intended
and I've reviewed the userpace NPTL implementation to verify that the
new infinity value correctly causes the desired semantics e.g. use of
a sensible default.

This will cause threads using the max stack to have their stack
decreased from 80 MB to 8 MB, but 80 MB was never the correct value to
use anyway and is the cause of userspace failures to create more
threads.

Cheers,
Carlos.

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

end of thread, other threads:[~2014-04-27 22:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-27 20:20 [PATCH] parisc: remove _STK_LIM_MAX override John David Anglin
2014-04-27 22:41 ` Carlos O'Donell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.