Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2163444rwl; Fri, 6 Jan 2023 02:48:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXtMk/L0PtAzdwiXrIIlnb9kxrdYloprXPjQxXnRrVybr3yPcqKSsa13FWeLuc+B/qDzIWD3 X-Received: by 2002:a05:6a20:6701:b0:af:ac38:911b with SMTP id q1-20020a056a20670100b000afac38911bmr53918892pzh.21.1673002081401; Fri, 06 Jan 2023 02:48:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673002081; cv=none; d=google.com; s=arc-20160816; b=ZJmTvbJKHY2IFBEAI2GKaPaz1ZYz8csEVEvtgGi+MxZPxCs9pcBqpCxID0EDXo58KF QegG6GC9W4ylOiQXM6N8MvDZhC0oi8931T94bTKPuFpLCYixb1+gkuFqknFQ2cyWFs9d heYEZ+Umh/Ov7pNA+sjueKBF1BWZB7xZWAu4fq7RU3ovG1Obnry1WYaVeuTunGq5XHDQ JFtdHzn7A2RjfaGj6qnYWUwzwdNjbX89YiNJohMEQ+hQN+eDavo3udtgcmtiU9yeL1Y4 0enaBEeFb0CkETK27hh1yunF1WX6CdfeCuB6VNMcHobF0W1eFvYUTmtpEQ0ZiAKrbLt2 lgog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n7VR15LegHBF69sDhJmN6JzG4w0jk+p6p7NGe25P8bg=; b=VNa/73Vvxp14F62czBcoayU44SLzqVgxf+bir1OoA1w+dqNslwIREj9jo0ROi/k31p LjLYgVw9CcDOEAQAu6f5p940k/iolbbAAjYTuLgQz8NCXPy4JkmtTeNDO4TIhkQc1Mbf 0Yly+2N3YLPZUJgH7Oy8i9WLylWXJ3+SADkpdP/GPfNtlmdQKgPMIb37uYGAhiJlVlIF 4zFJdFYOlQJ/Tmh7wI65/7oIzIDyAzgTZexYYPMr+b7eC62JXDxRX+FmZkQGQjExalCl AwzISLPGFEiniiF5019Is5alpIb8mkhBr2tWboUodB/UK61TS2/y22tPSQ05cZb7t5ER I66w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Nstk1Xox; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t10-20020a63dd0a000000b00496d08a27c0si1179329pgg.684.2023.01.06.02.47.53; Fri, 06 Jan 2023 02:48:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Nstk1Xox; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232216AbjAFKjI (ORCPT + 56 others); Fri, 6 Jan 2023 05:39:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbjAFKjH (ORCPT ); Fri, 6 Jan 2023 05:39:07 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A6306C2A3; Fri, 6 Jan 2023 02:39:04 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id AEB551EC06F0; Fri, 6 Jan 2023 11:39:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1673001542; 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:in-reply-to:in-reply-to: references:references; bh=n7VR15LegHBF69sDhJmN6JzG4w0jk+p6p7NGe25P8bg=; b=Nstk1XoxKFQcdBAOahpt8ZGGZaWBLRmZhEQ1CHfT6dMmUZhWocat06kvxWapC9TvWZDBQQ BLJ+IoNiQUT5SjwZmNCunen945AW8BneEeHtmco1kcqqVc7/TWez1PmuJ5ONtile6jy/GD UxFtR1xDgwu805SAb17/rZ0gqwZNfhE= Date: Fri, 6 Jan 2023 11:39:02 +0100 From: Borislav Petkov To: "Zhang, Rui" Cc: "Hansen, Dave" , "ak@linux.intel.com" , "x86@kernel.org" , "dave.hansen@linux.intel.com" , "peterz@infradead.org" , "linux-perf-users@vger.kernel.org" , "mingo@redhat.com" , "tglx@linutronix.de" , "kan.liang@linux.intel.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/2] perf/x86/rapl: Add support for Intel Meteor Lake Message-ID: References: <20230104145831.25498-1-rui.zhang@intel.com> <25d07838-3904-a086-4238-f56c9424b53a@intel.com> <4cc5cd868b20366fc9d4bf157656e0c295074282.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4cc5cd868b20366fc9d4bf157656e0c295074282.camel@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 06, 2023 at 06:05:41AM +0000, Zhang, Rui wrote: > But I still have a question. > Take RAPL feature for example, the feature is not architectural, > although 80% of the platforms may follow the same behavior, but there > are still cases that behave differently. And so far, there are 8 > different behaviors based on different models. > > In this case, can we have several different flags for the RAPL feature > and make the RAPL driver probe on different RAPL flags? Or else, a > model list is still needed. Well, you asked about detecting CPUs supporting RAPL. Now you're asking about different RAPL "subfunctionality" or whatever. You could do the synthetic flag for feature detection because apparently giving it a CPUID flag is soo expensive (/sarcastic eyeroll) and then you can pick apart subfeatures in the RAPL code and do flags there, away from the x86 arch code because no one should see that. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette