Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3979329pxv; Mon, 19 Jul 2021 13:29:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS95rLe7jQRKHmegaCQzEwnwi5FzapTp7F9OfZVv7deDdHmX28wltJOlshBn7TMPmH3hfV X-Received: by 2002:a17:907:f8e:: with SMTP id kb14mr28716968ejc.40.1626726570543; Mon, 19 Jul 2021 13:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626726570; cv=none; d=google.com; s=arc-20160816; b=gYHIbUkt2JXtpVFQ6xwb7wHiMW971T1OWUKjW38cbjc34LxdL1Z9+XRvhvzJ9WP3m5 ToEPs7f0sBnWQKlAdSbckqyCCBNx0sh4W5GzT0YqZqSwrIjRL8hPKbr7CkVah5Ii3Q07 ah/OK+EJtrZL7YoPiNVeM2sad6pBhrHkj2aiwDDRO6EdjRVDWY7c5B1dp2tZFan0p0tt 6s7MoxFUEuBxhdygwE6Vt5f/aqXVd5/6pj7iEAc7zHSCelmYAwfDTsA/pW5a8Bg4nUDc W9bthzRzSBWI39LK3GgUaps2XvZImduzVBN+JkutyQyH9mhAtm60PxOFGaTV/Kv5iotH 3RvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=IqnvZt+SGXWb3QndOpzB4HGHB3cAMqWFk7kVRnWw3wA=; b=yTSUL4IatIvSL2iwYQWX3PfVp+PuWj5uMI4EsezR+q+Ns0zkfsrTEzxEq5jyy9/Q1U Qz6Stw0Z6fNMASbmrdUKkHrvF0NvhazrtW7AaEMUckcW9X5rVATtqQyviqFY/iHVRaqx zozGKAVtcFm1PH1ooEYYcvYjtrmkQHlRK7/WMNN33QnZFbIQGKZycB/OlSwbynl5GVbm CqZ9GxCwBzEGYJ5Jesq8XEiqzrqxjt7+s816E/av2/woS/kGoA98+URVGK8zxq7/0ADz iR/wLhHHrn1XxRryIEF7t/OgDgO8hV3feS3ZCCI86AEFDRAJYVEp19xqkQQnNmdGJ+NT UFqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si21869540edx.286.2021.07.19.13.29.07; Mon, 19 Jul 2021 13:29:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386394AbhGSTcp (ORCPT + 99 others); Mon, 19 Jul 2021 15:32:45 -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--