linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-mm <linux-mm@kvack.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	chenchunxiao <chenchunxiao@huawei.com>, x86l <x86@kernel.org>,
	linux-api@vger.kernel.org
Subject: Re: [Question or BUG] [NUMA]: I feel puzzled at the function cpumask_of_node
Date: Thu, 8 Jun 2017 16:12:15 +0200	[thread overview]
Message-ID: <20170608141214.GJ19866@dhcp22.suse.cz> (raw)
In-Reply-To: <5937C608.7010905@huawei.com>

[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 <linux-mm@kvack.org>
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

  reply	other threads:[~2017-06-08 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07  9:23 [Question or BUG] [NUMA]: I feel puzzled at the function cpumask_of_node Leizhen (ThunderTown)
2017-06-08 14:12 ` Michal Hocko [this message]
2017-06-15  2:00   ` Leizhen (ThunderTown)

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=20170608141214.GJ19866@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=chenchunxiao@huawei.com \
    --cc=hpa@zytor.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thunder.leizhen@huawei.com \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).