From: Andrew Cooper Subject: [PATCH 5/6] x86/smp: Allocate pcpu stacks on their local numa node Date: Tue, 7 Apr 2015 18:26:19 +0100 Message-ID: <1428427580-8854-6-git-send-email-andrew.cooper3@citrix.com> References: <1428427580-8854-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1428427580-8854-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org Previously, all pcpu stacks tended to be allocated on node 0. Signed-off-by: Andrew Cooper CC: Keir Fraser CC: Jan Beulich --- I have not done any performance, but this is obviously an improvement. --- xen/arch/x86/smpboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index a009e91..116c8f8 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -642,7 +642,7 @@ static int cpu_smpboot_alloc(unsigned int cpu) if ( node != NUMA_NO_NODE ) memflags = MEMF_node(node); - stack_base[cpu] = alloc_xenheap_pages(STACK_ORDER, 0); + stack_base[cpu] = alloc_xenheap_pages(STACK_ORDER, memflags); if ( stack_base[cpu] == NULL ) goto oom; memguard_guard_stack(stack_base[cpu]); -- 1.7.10.4