From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qa0-f49.google.com (mail-qa0-f49.google.com [209.85.216.49]) by kanga.kvack.org (Postfix) with ESMTP id A537A6B0036 for ; Wed, 29 Jan 2014 10:58:07 -0500 (EST) Received: by mail-qa0-f49.google.com with SMTP id w8so2608302qac.22 for ; Wed, 29 Jan 2014 07:58:07 -0800 (PST) Received: from qmta09.emeryville.ca.mail.comcast.net (qmta09.emeryville.ca.mail.comcast.net. [2001:558:fe2d:43:76:96:30:96]) by mx.google.com with ESMTP id a8si2011703qak.176.2014.01.29.07.58.06 for ; Wed, 29 Jan 2014 07:58:07 -0800 (PST) Date: Wed, 29 Jan 2014 09:58:04 -0600 (CST) From: Christoph Lameter Subject: Re: [PATCH] kthread: ensure locality of task_struct allocations In-Reply-To: Message-ID: References: <20140128183808.GB9315@linux.vnet.ibm.com> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: David Rientjes Cc: Nishanth Aravamudan , LKML , Anton Blanchard , Andrew Morton , Tejun Heo , Oleg Nesterov , Jan Kara , Thomas Gleixner , Tetsuo Handa , linux-mm@kvack.org, Wanpeng Li , Joonsoo Kim , Ben Herrenschmidt On Wed, 29 Jan 2014, David Rientjes wrote: > > diff --git a/kernel/kthread.c b/kernel/kthread.c > > index b5ae3ee..8573e4e 100644 > > --- a/kernel/kthread.c > > +++ b/kernel/kthread.c > > @@ -217,7 +217,7 @@ int tsk_fork_get_node(struct task_struct *tsk) > > if (tsk == kthreadd_task) > > return tsk->pref_node_fork; > > #endif > > - return numa_node_id(); > > + return numa_mem_id(); > > I'm wondering why return NUMA_NO_NODE wouldn't have the same effect and > prefer the local node? > The idea here seems to be that the allocation may occur from a cpu that is different from where the process will run later on. -- 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: email@kvack.org