Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753801AbdCNCvg (ORCPT ); Mon, 13 Mar 2017 22:51:36 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:32822 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753071AbdCNCvd (ORCPT ); Mon, 13 Mar 2017 22:51:33 -0400 Date: Tue, 14 Mar 2017 10:51:29 +0800 From: Wei Yang To: Borislav Petkov Cc: Wei Yang , tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, tj@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] x86/mm/numa: trivial fix on typo and error message Message-ID: <20170314025129.GB99092@WeideMacBook-Pro.local> Reply-To: Wei Yang References: <20170206153529.14614-1-richard.weiyang@gmail.com> <20170313130010.anc2garjha4qfu4e@pd.tnic> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oC1+HKm2/end4ao3" Content-Disposition: inline In-Reply-To: <20170313130010.anc2garjha4qfu4e@pd.tnic> 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: 2709 Lines: 87 --oC1+HKm2/end4ao3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 13, 2017 at 02:00:10PM +0100, Borislav Petkov wrote: >On Mon, Feb 06, 2017 at 11:35:28PM +0800, Wei Yang wrote: >> When allocating pg_data in alloc_node_data(), it will try to allocate fr= om >> local node first and then from any node. If it fails at the second trial, >> it means there is not available memory on any node. >>=20 >> This patch fixes the error message and correct one typo. >>=20 >> Signed-off-by: Wei Yang >> --- >> arch/x86/mm/numa.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >>=20 >> diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c >> index 4366242356c5..3e9110b34147 100644 >> --- a/arch/x86/mm/numa.c >> +++ b/arch/x86/mm/numa.c >> @@ -201,8 +201,8 @@ static void __init alloc_node_data(int nid) >> nd_pa =3D __memblock_alloc_base(nd_size, SMP_CACHE_BYTES, >> MEMBLOCK_ALLOC_ACCESSIBLE); >> if (!nd_pa) { >> - pr_err("Cannot find %zu bytes in node %d\n", >> - nd_size, nid); >> + pr_err("Cannot find %zu bytes in any node\n", >> + nd_size); >> return; >> } > >Actually, the best would be: > > pr_err("Cannot find %zu bytes in any node (initial node: %d)\n", nd_size,= nid); > >or something like that. This way you say > >a) the initial node %nid failed >b) the fallback to any node failed too > >so that people trying to debug code can have the complete info in the >logs. > You are right, your message is more clear. I would send out v2 with this change. Thanks :-) >--=20 >Regards/Gruss, > Boris. > >Good mailing practices for 400: avoid top-posting and trim the reply. --=20 Wei Yang Help you, Help me --oC1+HKm2/end4ao3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYx1qxAAoJEKcLNpZP5cTdFiQP/0jPmS9PafEjbNSBm/NCysGL NNPuVepRkcvuW7rbztyLsMnGCVg/IsJwgc18+V8Qzp2OP6Xiz/1SaWkuUL/SPsJ1 CorkdlSxSeIvpofFfqkfIhn64s72O9J8DT+Iznxl60WgslOl+txdF/vpAjP9SGu3 2GJKqb67MGaUNtTBGPyk0F98E0YiYa9slcqyNOUp6gNdwZXgm9vwMmkGfJynWfOm oY3CfQhwMrRZ2bHJDZ+G3Ojy+/4YO0QoxbEGxpI8xiffiTEDPuGsLDH99VDe1+/y 7dhOJnaW1J4AnSZsknRsEtdm3Zy+L+4ID+jsQF8clrZd2ZshSP5EqytgXKDrr4wh LuGjzvAde01Lo7QAbU5BFdADUL55T4xdBNcDBJ4hrLXBy00nLWwC57qqjLuhpveB Ju4aE4O8t87F3hqRv47+7onnCZ446dSoNda9oDHz2vCVxeX8H0hi2LE25TooS+GD FMSL18/zaYH99CoMFwVw4fTxdg4LhvS6OTS2FlUH6iOEcz4Hmc0Io68EEsToa1iZ gzprwoM1GGBupZRubqR55qnTXGukNcrdmNjwa+ONudHUDs5Z6QbIFu7EgpMuLkSv kQ1aBfaMmDxrTfuwpet8COMDfsI/ew7YidW+i0ZmIcJpSwNO9VQxJFEVDkNSs65/ SuVHaSwiSpqdV69EITcA =Bd1y -----END PGP SIGNATURE----- --oC1+HKm2/end4ao3--