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 28363C4708D for ; Fri, 6 Jan 2023 14:50:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233560AbjAFOuI (ORCPT ); Fri, 6 Jan 2023 09:50:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234782AbjAFOuF (ORCPT ); Fri, 6 Jan 2023 09:50:05 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 391E880AEF; Fri, 6 Jan 2023 06:50:02 -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 C933F1EC050D; Fri, 6 Jan 2023 15:50:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1673016600; 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=pJXYOpevDeH94S9Y0/8hjDZhR1yAlOLk1AabVA0ifvI=; b=SvEJT9UNtkbWfP8Y8B3zja9SXWS0PDGwxOTN8z2sY7qwB2zdisTuyotKg8jaFMc0I0kUFr 7yN1MOrMbBd1A0MCGGjFEBmPFYwnbJG9QL0aVaMfTapxvSeoI2LWdxGV9G6v6NhT4ksMrA VI+ELc8doeCSNwf7Ph+TGsWZ1kJYcdA= Date: Fri, 6 Jan 2023 15:49:56 +0100 From: Borislav Petkov To: "Zhang, Rui" Cc: "Hansen, Dave" , "ak@linux.intel.com" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "peterz@infradead.org" , "linux-perf-users@vger.kernel.org" , "mingo@redhat.com" , "tglx@linutronix.de" , "kan.liang@linux.intel.com" , "Bityutskiy, Artem" , "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: Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On Fri, Jan 06, 2023 at 02:38:10PM +0000, Zhang, Rui wrote: > And then set the feature flags based on this, and make the drivers test > the feature flags. That would be the purpose of synthetic flags. > The goal of this is to do model list update in one place instead of 4 > or more different drivers when a new model comes. Do you really have to update 4 different places each time? As said before, you have to do the model matching *somewhere*. If you have to do model matching in a lot of drivers - and it looks like you do - judging by $ git grep X86_MATCH_INTEL_FAM6 output, then doing the matching once in cpu/intel.c and setting a synthetic flag does make sense because all that matching code will disappear from all the drivers but be concentrated in one place. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette