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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 7F920C6377B for ; Wed, 21 Jul 2021 20:38:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C0CC61246 for ; Wed, 21 Jul 2021 20:38:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233434AbhGUT6C (ORCPT ); Wed, 21 Jul 2021 15:58:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbhGUT56 (ORCPT ); Wed, 21 Jul 2021 15:57:58 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 385E8C061575 for ; Wed, 21 Jul 2021 13:38:34 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1626899912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kx33BaNtRMi/Cr+LubGcPaYEfYoSSN2sEnv6KnS7qMs=; b=eBJOtFTXoJzBZ7w4E9OiFnqCpxQRZVLf5Vl6y40eePTheoSDa0PN+NWf7rLUnZ/9bB41z9 xoUPkK4DvSEyXMHukUNv7AsI5g8eN1WfOxBHz6xLoaDUzejPBdZr6kxFEzCZLY0F8RFhN9 rU9tX3/bayBDkRZHvb3HyVo8fKjWgmUu9s2LdGpjXuk3ataPa/hVS59ikSCdm3XUeuDDWh QUnT6rGUepfx8pGF5yRJsZJEL5eYgHGiwcj0tSdObbPRCNAGkyZ/r3kvBq77teBUOCGWO1 JrxOA/LSmEsBd1GrNbVTzGibDMKVUPnfSOcnjfhc5rTdRuKd2uuIPeaMGHofjg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1626899912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kx33BaNtRMi/Cr+LubGcPaYEfYoSSN2sEnv6KnS7qMs=; b=TAmdBeDymkFnwWDvrbqCpYOigTJmEG3cWdnZqf3iQBAAVmUmCWVIGmpTBq2quMXBvEuMIk VGCDzv1W+rYUNZDw== To: Rik van Riel , 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 Subject: Re: [PATCH] x86,mm: print likely CPU at segfault time In-Reply-To: References: <20210719150041.3c719c94@imladris.surriel.com> Date: Wed, 21 Jul 2021 22:38:32 +0200 Message-ID: <87pmvbpflj.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 19 2021 at 15:34, Rik van Riel wrote: > 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 cp= u/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. Just add topology_physical_package_id() and you have a complete picture. Thanks, tglx