Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2369075rwa; Mon, 22 Aug 2022 06:44:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR4F1VMalNdy7SNBNfkdC7Rn6pa5GFP+uHKW5a/P/2JBDGpcqg63sEQG3Zm5MBBlLf0HXwne X-Received: by 2002:a17:907:e89:b0:730:af06:e345 with SMTP id ho9-20020a1709070e8900b00730af06e345mr13459155ejc.665.1661175891707; Mon, 22 Aug 2022 06:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661175891; cv=none; d=google.com; s=arc-20160816; b=i4y/3Ln6DP/RjFX6PGPkzRslR22xUDKpV+/houGymBufR3ohotvkavHfUgxH5Db7Ey pPnxmz8egobuT3EMy1+f5DCFtlF+gTFi1FK5Dl8J91NZWpkuQsIYRfyehflGY5FVmEkq vj3ej+zygqiXtB0kZUO8QuTMuxWOmVKMuAF3Asi6UP9yJxAyAU/3NW9NUDvObcJVMzgk q6TNsl5JX+h8bZ+XAp8N6hABlq6Vs4OQbL+pdBpjmZKPVLb27xn+YsQ/DWU/tpsv9F0q qxTTUMVfKcZj3pEUI8i/V2FGMxmLk3qCtd3EKRi0gkO4eHKHlWTJ6tTonmbPv0A+dRE+ 55AA== 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=hYtojPMz9irO+oG6WMN7GeV1hjHjMbyrt3xn3Ye5F4M=; b=feBy8vKle6/+WBROdzTogTCRyrmaBMNgVMlppQng3GQ480T2XYiScKs6+REZndcrpL k3LMUu3prvdvaIFD4VIWbhAWgqyHgtsBDqr5mRcEJfjbKI7q6QBg/sjfzm1lVdnhn5UV 6G70OC5LmEd4ICN575eoG28v0dy9Y2NUPl9nD1FYNo6DWvK4nmD/h/VhtmUeT+4xh55l 0WcQJC5Z36NT6iwh80MbTrbIIb7tLA8dpcX1QQeWh9vevGBExUGdC+RNeQxCfu8/IoE0 O3mAt4QE9mEQbAQMDB8H9smvs4N0qJ/t2GyFf4m7ajetfsCx/VJS2t35ZbCUAH/NmDNJ JnCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=telDdeV9; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q8-20020a170906360800b007387740b9c2si2121418ejb.2.2022.08.22.06.44.26; Mon, 22 Aug 2022 06:44:51 -0700 (PDT) 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=@infradead.org header.s=casper.20170209 header.b=telDdeV9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235050AbiHVN1U (ORCPT + 99 others); Mon, 22 Aug 2022 09:27:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234839AbiHVN1P (ORCPT ); Mon, 22 Aug 2022 09:27:15 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5064C31236; Mon, 22 Aug 2022 06:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=hYtojPMz9irO+oG6WMN7GeV1hjHjMbyrt3xn3Ye5F4M=; b=telDdeV9S/RPd/vQa3QCYA2EwV j7J6BAXROQxnM4A4VHodLqpzMKA7Gn8pDpgRD56fXBFHitsCJp22Pjy2lxhAtsrBna7V8xBWLMQQ4 Z8JH13HSrZ3qniUGmv+qpaN3GNlB+c+SxdhRu3RYkU9Wxr82pj8DnoRN0g4nS3i4ndyrxYYxo2MQq oxQvQnn9+u2U2EYfBHefvA2K8e6R7jYe2SGBQ0c0MQznxWg0hS5MQi5iehENj4vttg8g198ciacrK jINTr2LdNmF2lkzywXX3/kSlVPB52vOAicpy5sP3W68MZW10l5+Oag8FPttaNJYeQf7TxMvS5JOgE u0YWhiNg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQ7SF-00EJDr-FL; Mon, 22 Aug 2022 13:26:59 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id D50709804A3; Mon, 22 Aug 2022 15:26:56 +0200 (CEST) Date: Mon, 22 Aug 2022 15:26:56 +0200 From: Peter Zijlstra To: Sandipan Das Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, x86@kernel.org, bp@alien8.de, acme@kernel.org, namhyung@kernel.org, jolsa@kernel.org, tglx@linutronix.de, mingo@redhat.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, dave.hansen@linux.intel.com, like.xu.linux@gmail.com, Stephane Eranian , ananth.narayan@amd.com, ravi.bangoria@amd.com, santosh.shukla@amd.com Subject: Re: [PATCH 04/13] x86/cpufeatures: Add LbrExtV2 feature bit Message-ID: References: <172d2b0df39306ed77221c45ee1aa62e8ae0548d.1660211399.git.sandipan.das@amd.com> <06e9a357-422d-1870-ae72-18e74964caf3@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06e9a357-422d-1870-ae72-18e74964caf3@amd.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Mon, Aug 22, 2022 at 06:22:25PM +0530, Sandipan Das wrote: > AMD LbrExtV2 is similar to Intel LBR. Unlike BRS, LbrExtV2 does not rely on LbrExtV2 must be the most terrible name ever, please stop using it. Heck your own code calls it lbr_v2 wherever it can. So can we please just kill that name entirely? $ quilt diff --combine - | grep -i lbrext_v2 + if (x86_pmu.version < 2 || !boot_cpu_has(X86_FEATURE_LBREXT_V2)) +#define X86_FEATURE_LBREXT_V2 ( 3*32+17) /* AMD Last Branch Record Extension Version 2 */ + { X86_FEATURE_LBREXT_V2, CPUID_EAX, 1, 0x80000022, 0 }, Is the complete usage of this silly name. > interrupt holding. The branch records are "frozen" at the time of counter > overflow. Yes, I get all that. It is also significantly different from Intel LBR in all details and shares not a single line of code, so also calling it LBR is confusing at best. The MSRs are called AMD_SAMPL_BR, so why not call the thing BRS_V2 ?