From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 253BFC636CE for ; Mon, 19 Jul 2021 20:18:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3BF7A6113E for ; Mon, 19 Jul 2021 20:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386404AbhGSTdS (ORCPT ); Mon, 19 Jul 2021 15:33:18 -0400 Received: from shelob.surriel.com ([96.67.55.147]:48326 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383807AbhGSSyM (ORCPT ); Mon, 19 Jul 2021 14:54:12 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m5Z2E-0003Gd-IN; Mon, 19 Jul 2021 15:34:38 -0400 Message-ID: Subject: Re: [PATCH] x86,mm: print likely CPU at segfault time From: Rik van Riel To: Dave Hansen , linux-kernel@vger.kernel.org Cc: Dave Hansen , Andy Lutomirski , kernel-team@fb.com, Peter Zijlstra , Ingo Molnar , Borislav Petkov , x86@kernel.org Date: Mon, 19 Jul 2021 15:34:38 -0400 In-Reply-To: References: <20210719150041.3c719c94@imladris.surriel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-l5bQu8+DJCBx325/Mnpg" User-Agent: Evolution 3.40.2 (3.40.2-1.fc34) MIME-Version: 1.0 Sender: riel@shelob.surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-l5bQu8+DJCBx325/Mnpg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2021-07-19 at 12:20 -0700, Dave Hansen wrote: > If it's as trivial as: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0printk(KERN_CONT " on cpu= /core %d/%d", > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0raw_smp_processor_id(), > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0topology_core_id(raw_smp_processor_id())); >=20 > it would be handy.=C2=A0 But, it's also not hard to look at 10 segfaults, > see > that they happened only on 2 CPUs and realize that hyperthreading is > enabled. One problem with topology_core_id() is that that, on a multi-socket system, the core number may not be unique. That is why I ended up going with just the CPU number. It's pretty easy to put one and one together afterwards. Thanks for your quick patch review. --=20 All Rights Reversed. --=-l5bQu8+DJCBx325/Mnpg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmD1084ACgkQznnekoTE 3oMZwQf/dqGU0jn2GOBPnw0rMkRskRrmxg0yleYt5P2UKFatS3hTKRNCQVBg10pL 5BA6gsz2yk/oSHc/188BCjcW8KcWdq21obf9oxflp0w1uGkP8A9CGIg1zt0VndA2 zO2W18o6tECPgxYEevpaVlqqHI+yLV7XNN4Wk//UF5T1M2+QBr4BBvoPq9SVKp6w 3kbE1smSvgTz2FmPS6LrbJkvZSkc/e30veMn8py1q6NHDZe/b5wVbgcQJwEAdU1S 8eIiJnZ3VSQnRd/ay5kYrsYcm95T5rxjoTsBvIBy6FTBIiJXCy01kMff3/sicr5e xgBsiYv058s3wwzNquscFsBdQH7r0Q== =Ppt7 -----END PGP SIGNATURE----- --=-l5bQu8+DJCBx325/Mnpg--