Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2557pxv; Wed, 21 Jul 2021 13:54:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdzFT7Ypm/ECcsLQjAr7aGx8B0ke+KBxg18JACpv+w2tTVfGLUVSLDeZrlRMwdKQWi+MBg X-Received: by 2002:a17:906:5e51:: with SMTP id b17mr40323665eju.270.1626900858506; Wed, 21 Jul 2021 13:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626900858; cv=none; d=google.com; s=arc-20160816; b=x1+IN69X/HWnlIxDOXKc+m+FHC0YjGqDqRZL0ty4kMSMTu9Uf1JdZXDz05dIONCkRJ t2LTGojMHR9bstGEO/gmMrIN4Hw2H1oB2LNHlfqZd2dJHN1XEwvbbvDVtkMoJTGiVMQD LvQcWnucRL/s52s58SL3hJFBSl0Sk8s+//yFvuBzOPg2T4didwLpNi8ACd16PP+saCkd CW0dvzCJpRYfxGzS4gTbvvRElzG6JHeMEIG8+a4ciTBL3Sp5CT7rNzq8mmtRhh1FRY7a pxefKuyeMTVBY5sfm91DB0ZcASUEJvoeQ0TZd6nX7w5D/jcSFhRZowvJrKdoBJCMuF0F tdZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=Kx33BaNtRMi/Cr+LubGcPaYEfYoSSN2sEnv6KnS7qMs=; b=VdqWCu1dQ6vLuNxdz00YwbyKBa3o/XCgCY+bI3FYRObnya704YksojcMhHssHRc6QL rivxqDcHZK1/Zrr9vW77+XO8sQ0MQ0Nkey4NbZQFky+gfOgpQ1hVoBusIoT29xgknzIv oFwf4ecjT4Lhm1fz4wZp5ZJrOk9sE4gvJLjac+RYHtHQy4Tg37uAYNn8aWuaG1i5nun5 KMNlh1uTX1kl0dSwj/EMUBQSq7em0ImJCbjx1SsfGYVOf6MX01ujj51XJjOQTyBwD134 VEg7mZ4do4oYK8X+iT4hdW6t0QZhgAIA02qeUiJQ0UnzyOABDD3L6nTzzlxwyiDJOdM/ 0XXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eBJOtFTX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=TAmdBeDy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f24si27562265edw.224.2021.07.21.13.53.54; Wed, 21 Jul 2021 13:54:18 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eBJOtFTX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=TAmdBeDy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234002AbhGUT6C (ORCPT + 99 others); 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