Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753538AbdDKBo7 (ORCPT ); Mon, 10 Apr 2017 21:44:59 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36417 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752336AbdDKBo4 (ORCPT ); Mon, 10 Apr 2017 21:44:56 -0400 Date: Tue, 11 Apr 2017 09:44:34 +0800 From: Wei Yang To: David Rientjes Cc: Wei Yang , kirill@shutemov.name, bp@alien8.de, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, tj@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes Message-ID: <20170411014434.GB35630@WeideMacBook-Pro.local> Reply-To: Wei Yang References: <20170410165652.50250-1-richard.weiyang@gmail.com> <20170410165652.50250-4-richard.weiyang@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mojUlQ0s9EVzWg2t" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2780 Lines: 80 --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 10, 2017 at 05:36:25PM -0700, David Rientjes wrote: >On Tue, 11 Apr 2017, Wei Yang wrote: > >> By emulating numa, it may contains more or less nodes than physical node= s. >> In numa_emulation(), numa_meminfo/numa_distance/__apicid_to_node is >> restructured according to emulated nodes, except numa_nodes_parsed. >>=20 >> This patch restructures numa_nodes_parsed from emulated nodes. >>=20 >> Signed-off-by: Wei Yang > >Acked-by: David Rientjes > >although there's a small nit: NODE_MASK_NONE is only used for=20 >initialization, this should be nodes_clear(numa_nodes_parsed) instead, but= =20 >that would be up to the x86 maintainers to allow it. > Thanks for pointing out :-) I would pay attention to this next time. >> --- >> arch/x86/mm/numa_emulation.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >>=20 >> diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c >> index a6d01931b9a1..14f075fc4cc5 100644 >> --- a/arch/x86/mm/numa_emulation.c >> +++ b/arch/x86/mm/numa_emulation.c >> @@ -391,6 +391,13 @@ void __init numa_emulation(struct numa_meminfo *num= a_meminfo, int numa_dist_cnt) >> /* commit */ >> *numa_meminfo =3D ei; >> =20 >> + /* Make sure numa_nodes_parsed only contains emulated nodes */ >> + numa_nodes_parsed =3D NODE_MASK_NONE; >> + for (i =3D 0; i < ARRAY_SIZE(ei.blk); i++) >> + if (ei.blk[i].start !=3D ei.blk[i].end && >> + ei.blk[i].nid !=3D NUMA_NO_NODE) >> + node_set(ei.blk[i].nid, numa_nodes_parsed); >> + >> /* >> * Transform __apicid_to_node table to use emulated nids by >> * reverse-mapping phys_nid. The maps should always exist but fall --=20 Wei Yang Help you, Help me --mojUlQ0s9EVzWg2t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY7DUCAAoJEKcLNpZP5cTdxmIP/jKbrO9HKmb1s10hFJZ06tn/ betpykpVz7+4z+48zaK7QBmVXCWd6FSd48pZiKlyGZKFautQ77jbuOB9bXhhLy8H 29eP0MOrrpkYmSfGIieTB/9a/hJWXkL5obt4BMhWGYYT/dUog1+tZ81B4CIMBg9p bEUiu3jkK8Gd8c/LrRk6x5PFddLZGEVDAlZERXPzlWV2wzzB5/Pp8q4xeGnY3p4X Dc3fqYQCBgTAhv4LMBnFCMNThs/4e3eeSA8ThUiBY2ZMJ6a/s2q8zgXEL0aOsVO7 ReCRstHjzANNWOp8Yh7/oMvFlJAj+YOnsgGaFoAy9Jo/AQNKtqdEaOdCNYjfdO2r Z/JUR2LSJ2IotyrTVXKvHNvADsM4zLm7ruEvwwLFWBnAxsHrz6BEUE0L41lXIWw2 Eo0p1Jlt858B8qK5kj1gT8iRCyWzDQYMyXm7amuooqe/NfXiSmJA+t/SKc0YJOIg 8G5L/c3TcKqcieeXSaLPV1y6g8Pw53r8uV7//2ECxNOi5RVK2n6eclTqTThVW0GO mUTCpp3FiaiZ3pZPFdl/mx6JjxdRj8KK8kJIW2Wbe0vvI/eBa2oa7pnHbH8k1Ieq QCIIrUUD9gm00bKm6TLKMw83an6oh/MZS7ro3xNMBbE8FYEGoBAAcYXoK3IDLDyf P+MyLoF3YonlUtMNVthT =OZJA -----END PGP SIGNATURE----- --mojUlQ0s9EVzWg2t--