From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-x231.google.com (mail-qg0-x231.google.com [IPv6:2607:f8b0:400d:c04::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id CFFF81A07E5 for ; Sat, 19 Jul 2014 04:58:37 +1000 (EST) Received: by mail-qg0-f49.google.com with SMTP id j107so3395254qga.36 for ; Fri, 18 Jul 2014 11:58:33 -0700 (PDT) Sender: Tejun Heo Date: Fri, 18 Jul 2014 14:58:29 -0400 From: Tejun Heo To: Nish Aravamudan Subject: Re: [RFC 0/2] Memoryless nodes and kworker Message-ID: <20140718185829.GF13012@htj.dyndns.org> References: <20140717230923.GA32660@linux.vnet.ibm.com> <20140718112039.GA8383@htj.dyndns.org> <20140718180008.GC13012@htj.dyndns.org> <20140718181947.GE13012@htj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Cc: Fenghua Yu , Tony Luck , linux-ia64@vger.kernel.org, Nishanth Aravamudan , "linux-kernel@vger.kernel.org" , Linux Memory Management List , David Rientjes , Joonsoo Kim , linuxppc-dev@lists.ozlabs.org, Jiang Liu , Wanpeng Li List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hello, On Fri, Jul 18, 2014 at 11:47:08AM -0700, Nish Aravamudan wrote: > Why are any callers of the format kthread_create_on_node(..., > cpu_to_node(cpu), ...) not using kthread_create_on_cpu(..., cpu, ...)? Ah, okay, that's because unbound workers are NUMA node affine, not CPU. > It seems like an additional reasonable approach would be to provide a > suitable _cpu() API for the allocators. I'm not sure why saying that > callers should know about NUMA (in order to call cpu_to_node() in every > caller) is any better than saying that callers should know about memoryless > nodes (in order to call cpu_to_mem() in every caller instead) -- when at It is better because that's what they want to express - "I'm on this memory node, please allocate memory on or close to this one". That's what the caller cares about. Calling with cpu could be an option but you'll eventually run into cases where you end up having to map back NUMA node id to a CPU on it, which will probably feel at least a bit silly. There are things which really are per-NUMA node. So, let's please express what needs to be expressed. Massaging around it can be useful at times but that doesn't seem to be the case here. Thanks. -- tejun