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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDF1CC25B0E for ; Tue, 16 Aug 2022 11:23:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232542AbiHPLXO (ORCPT ); Tue, 16 Aug 2022 07:23:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234261AbiHPLWu (ORCPT ); Tue, 16 Aug 2022 07:22:50 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B75779D133; Tue, 16 Aug 2022 02:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660643244; x=1692179244; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZB0wkmjlPdDSTA4EwQQs+F8Xlb10ueDxQGjHJOmfvkI=; b=W3J8XpGSJyBR66uMLKiswwoJLPKH+jmvDYbHtT4G6Z8DND7Ona+CT3VV 6x7itKMAPuSvdxo0a4qS+M5CMDoEMTggEfgtMi1pz6e1DZquvANegYCtB WCz0gUvB+xPgDH60fOltWQzqMRTK0QZqRDWNJkdtv3KSkKu3fn74uYn1n WS74wFyeyZcc06lXucDiXQCth13I6yJTd9W97CjLP6ANgbuA4XM/RBPns spIz5nMH9aOJroStMwskW8Ul49uZ5nS7PAOUcq6av1R/g6kW7SAQoSePD JxrePsa5MXlZJBHP/0qVE3ejo1+TYyEu8PgOx8Agx5orI0pcFo4IPrtOr g==; X-IronPort-AV: E=McAfee;i="6400,9594,10440"; a="275229847" X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="275229847" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2022 02:47:23 -0700 X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="934839368" Received: from rvanorma-mobl.gar.corp.intel.com ([10.213.153.166]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2022 02:47:18 -0700 Message-ID: <8496afee057d63b83a7ff02ec7f1de8c2d0e97ae.camel@intel.com> Subject: Re: [PATCH V2 1/8] perf/x86/intel/P4: Fix smp_num_siblings usage From: Zhang Rui To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-hwmon@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, corbet@lwn.net, fenghua.yu@intel.com, jdelvare@suse.com, linux@roeck-us.net, len.brown@intel.com Date: Tue, 16 Aug 2022 17:47:14 +0800 In-Reply-To: References: <20220816051633.17775-1-rui.zhang@intel.com> <20220816051633.17775-2-rui.zhang@intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org On Tue, 2022-08-16 at 10:27 +0200, Peter Zijlstra wrote: > On Tue, Aug 16, 2022 at 01:16:26PM +0800, Zhang Rui wrote: > > smp_num_siblings can be larger than 2. > > > > Any value larger than 1 suggests HT is supported. > > Subject and Changelog are still utterly insane. what about this one, do I need to resend the full series? thanks, rui >From 2e368e6afa83cb73e44ac8c3cf8339207097d9e1 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Tue, 28 Jun 2022 11:02:12 +0800 Subject: [PATCH V3 1/8] perf/x86/intel/P4: unify logic for detecting HT Any value larger than 1 suggests HT is supported. Although smp_num_siblings cannot be larger than 2 on P4 platform, it is better to keep this logic consistent across the kernel. Reviewed-by: Len Brown Signed-off-by: Zhang Rui --- arch/x86/include/asm/perf_event_p4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/perf_event_p4.h b/arch/x86/include/asm/perf_event_p4.h index 94de1a05aeba..b14e9a20a7c0 100644 --- a/arch/x86/include/asm/perf_event_p4.h +++ b/arch/x86/include/asm/perf_event_p4.h @@ -189,7 +189,7 @@ static inline int p4_ht_active(void) static inline int p4_ht_thread(int cpu) { #ifdef CONFIG_SMP - if (smp_num_siblings == 2) + if (smp_num_siblings > 1) return cpu != cpumask_first(this_cpu_cpumask_var_ptr(cpu_sibling_map)); #endif return 0; -- 2.25.1