From: Andy Whitcroft <apw@shadowen.org>
To: clameter@sgi.com
Cc: akpm@linux-foundation.org, linux-mm@kvack.org, ak@suse.de,
travis@sgi.com
Subject: Re: [patch 2/2] x86_64: Configure stack size
Date: Wed, 7 Nov 2007 19:14:53 +0000 [thread overview]
Message-ID: <20071107191453.GC5080@shadowen.org> (raw)
In-Reply-To: <20071107004710.862876902@sgi.com>
On Tue, Nov 06, 2007 at 04:43:59PM -0800, clameter@sgi.com wrote:
> Make the stack size configurable necessary. SGI NUMA configurations may need
> more stack because cpumasks and nodemasks are at times kept on the stack.
> This patch allows to run with 16k or 32k kernel stacks.
>
> Cc: ak@suse.de
> Cc: travis@sgi.com
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
>
> ---
> arch/x86/Kconfig.x86_64 | 6 ++++++
> include/asm-x86/page_64.h | 3 +--
> include/asm-x86/thread_info_64.h | 4 ++--
> 3 files changed, 9 insertions(+), 4 deletions(-)
>
> Index: linux-2.6/arch/x86/Kconfig.x86_64
> ===================================================================
> --- linux-2.6.orig/arch/x86/Kconfig.x86_64 2007-11-06 12:34:13.000000000 -0800
> +++ linux-2.6/arch/x86/Kconfig.x86_64 2007-11-06 15:44:36.000000000 -0800
> @@ -378,6 +378,12 @@ config NODES_SHIFT
> default "6"
> depends on NEED_MULTIPLE_NODES
>
> +config THREAD_ORDER
> + int "Kernel stack size (in page order)"
> + default "1"
> + help
> + Page order for the thread stack.
> +
> # Dummy CONFIG option to select ACPI_NUMA from drivers/acpi/Kconfig.
>
> config X86_64_ACPI_NUMA
> Index: linux-2.6/include/asm-x86/page_64.h
> ===================================================================
> --- linux-2.6.orig/include/asm-x86/page_64.h 2007-10-17 13:35:53.000000000 -0700
> +++ linux-2.6/include/asm-x86/page_64.h 2007-11-06 15:44:36.000000000 -0800
> @@ -9,8 +9,7 @@
> #define PAGE_MASK (~(PAGE_SIZE-1))
> #define PHYSICAL_PAGE_MASK (~(PAGE_SIZE-1) & __PHYSICAL_MASK)
>
> -#define THREAD_ORDER 1
> -#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
> +#define THREAD_SIZE (PAGE_SIZE << CONFIG_THREAD_ORDER)
> #define CURRENT_MASK (~(THREAD_SIZE-1))
>
> #define EXCEPTION_STACK_ORDER 0
> Index: linux-2.6/include/asm-x86/thread_info_64.h
> ===================================================================
> --- linux-2.6.orig/include/asm-x86/thread_info_64.h 2007-11-06 15:44:31.000000000 -0800
> +++ linux-2.6/include/asm-x86/thread_info_64.h 2007-11-06 15:44:36.000000000 -0800
> @@ -80,9 +80,9 @@ static inline struct thread_info *stack_
> #endif
>
> #define alloc_thread_info(tsk) \
> - ((struct thread_info *) __get_free_pages(THREAD_FLAGS, THREAD_ORDER))
> + ((struct thread_info *) __get_free_pages(THREAD_FLAGS, CONFIG_THREAD_ORDER))
>
> -#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER)
> +#define free_thread_info(ti) free_pages((unsigned long) (ti), CONFIG_THREAD_ORDER)
>
> #else /* !__ASSEMBLY__ */
We seem to be growing two different mechanisms here for 32bit and 64bit.
This does seem a better option than that in 32bit CONFIG_4KSTACKS etc.
IMO when these two merge we should consolidate on this version.
Reviewed-by: Andy Whitcroft <apw@shadowen.org>
-apw
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-11-07 19:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-07 0:43 [patch 0/2] X86_64 configurable " clameter
2007-11-07 0:43 ` [patch 1/2] x86_64: Clean up stack allocation and free clameter
2007-11-07 19:11 ` Andy Whitcroft
2007-11-07 0:43 ` [patch 2/2] x86_64: Configure stack size clameter
2007-11-07 19:14 ` Andy Whitcroft [this message]
2007-11-07 23:12 ` Andi Kleen
2007-11-08 0:42 ` Christoph Lameter
2007-11-09 20:13 ` Andrew Morton
2007-11-09 20:45 ` Christoph Lameter
2007-11-09 21:10 ` Andrew Morton
2007-11-09 21:19 ` Christoph Lameter
2007-11-09 21:46 ` Andrew Morton
2007-11-09 21:50 ` Christoph Lameter
2007-11-10 17:21 ` Andi Kleen
[not found] <Pine.LNX.4.64.0711121147350.27017@schroedinger.engr.sgi.com>
2007-11-19 18:19 ` Mike Travis
2007-11-19 20:05 ` Andi Kleen
2007-11-19 22:35 ` Christoph Lameter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071107191453.GC5080@shadowen.org \
--to=apw@shadowen.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=linux-mm@kvack.org \
--cc=travis@sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox