diff options
author | Helge Deller <deller@gmx.de> | 2014-04-30 23:26:02 +0200 |
---|---|---|
committer | James Hogan <james.hogan@imgtec.com> | 2014-05-15 00:01:41 +0100 |
commit | 042d27acb64924a0e8a43e972485913a32407beb (patch) | |
tree | 0a0d7f6bc2fcf5dd1e12b7da481c22464fa3e859 /arch/metag | |
parent | d71f290b4e98a39f49f2595a13be3b4d5ce8e1f1 (diff) | |
download | blackbird-op-linux-042d27acb64924a0e8a43e972485913a32407beb.tar.gz blackbird-op-linux-042d27acb64924a0e8a43e972485913a32407beb.zip |
parisc,metag: Do not hardcode maximum userspace stack size
This patch affects only architectures where the stack grows upwards
(currently parisc and metag only). On those do not hardcode the maximum
initial stack size to 1GB for 32-bit processes, but make it configurable
via a config option.
The main problem with the hardcoded stack size is, that we have two
memory regions which grow upwards: stack and heap. To keep most of the
memory available for heap in a flexmap memory layout, it makes no sense
to hard allocate up to 1GB of the memory for stack which can't be used
as heap then.
This patch makes the stack size for 32-bit processes configurable and
uses 80MB as default value which has been in use during the last few
years on parisc and which hasn't showed any problems yet.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: linux-parisc@vger.kernel.org
Cc: linux-metag@vger.kernel.org
Cc: John David Anglin <dave.anglin@bell.net>
Diffstat (limited to 'arch/metag')
-rw-r--r-- | arch/metag/include/asm/processor.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/metag/include/asm/processor.h b/arch/metag/include/asm/processor.h index 3be8581af495..a8a37477c66e 100644 --- a/arch/metag/include/asm/processor.h +++ b/arch/metag/include/asm/processor.h @@ -23,7 +23,7 @@ #define STACK_TOP (TASK_SIZE - PAGE_SIZE) #define STACK_TOP_MAX STACK_TOP /* Maximum virtual space for stack */ -#define STACK_SIZE_MAX (1 << 28) /* 256 MB */ +#define STACK_SIZE_MAX (CONFIG_MAX_STACK_SIZE_MB*1024*1024) /* This decides where the kernel will search for a free chunk of vm * space during mmap's. |