From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751619AbdFHOMZ (ORCPT ); Thu, 8 Jun 2017 10:12:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:50259 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751516AbdFHOMX (ORCPT ); Thu, 8 Jun 2017 10:12:23 -0400 Date: Thu, 8 Jun 2017 16:12:15 +0200 From: Michal Hocko To: "Leizhen (ThunderTown)" Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Catalin Marinas , Will Deacon , linux-arm-kernel , linux-mm , linux-kernel , chenchunxiao , x86l , linux-api@vger.kernel.org Subject: Re: [Question or BUG] [NUMA]: I feel puzzled at the function cpumask_of_node Message-ID: <20170608141214.GJ19866@dhcp22.suse.cz> References: <5937C608.7010905@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5937C608.7010905@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [CC linux-api] On Wed 07-06-17 17:23:20, Leizhen (ThunderTown) wrote: > When I executed numactl -H(print cpumask_of_node for each node), I got > different result on X86 and ARM64. For each numa node, the former > only displayed online CPUs, and the latter displayed all possible > CPUs. Actually, all other ARCHs is the same to ARM64. > > So, my question is: Which case(online or possible) should function > cpumask_of_node be? Or there is no matter about it? Unfortunatelly the documentation is quite unclear What: /sys/devices/system/node/nodeX/cpumap Date: October 2002 Contact: Linux Memory Management list Description: The node's cpumap. not really helpeful, is it? Semantically I _think_ printing online cpus makes more sense because it doesn't really make much sense to bind anything on offline nodes. Generic implementtion of cpumask_of_node indeed provides only online cpus. I haven't checked specific implementations of arch specific code but listing offline cpus sounds confusing to me. -- Michal Hocko SUSE Labs