Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1007112rdh; Fri, 24 Nov 2023 03:19:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2wCNffgy2nrmuHJAseGb9IzceWqlzobjo6DimnQFanYXZb+1zDSQauVJ53hijMdocaJXP X-Received: by 2002:a17:90b:164a:b0:285:92c6:cc26 with SMTP id il10-20020a17090b164a00b0028592c6cc26mr682525pjb.40.1700824794121; Fri, 24 Nov 2023 03:19:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700824794; cv=none; d=google.com; s=arc-20160816; b=fRyoET0PpeNQWSQsT7S0UjmUQg278OhTK24vn7UhdvmAFXtrisBR7JBGvsVCq7fK5x 2+A+YHIvwb5At2KCE5h/BBJO1ySvcGJ0nCyLF53Rx5ERnw4O9xxsXF213rgiJjYEVmzC ejgTLErzmo/JFtbsLyGe6FHvaJZ+hG+T9T+ZN1uLfKjccLpV+Tbpvq3NCtuwY4jg5xUY GWpIno/ysPvsVRYjL2HNkN1iIYaEbPW9zbz+gq7T3uZSRMvRpFHXdEu+iMw7lbfOZ+Fs GY7EFeQvd7hTRQvAmb39e22uSLOXo7Ui2gqqVVH5O80aE3vQuHcJiV4xnR+03AmLnxc3 T0xw== 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; bh=4DsvPWuAk0ACav/owhVd2h7wTc4oILFDN78PzWVaMu0=; fh=tXtxy+MIt09cRpC7Qvm1yg0QHAAyHkrIOOtVz1KT0yE=; b=Co1uKoUmbi+7GagZGbpXHA4eao4nNlOshCNSc3bB+mnFAVEfPDzzdx6/OYDj7IDkzW YujIlrM6c2yI7PtGvyaqTu43cxdNQrIAPzXP3f2qiwa3iQVgIRiSogIHkbbyur2IAaju v3vaCJ7H6cl6wbJbzmFveoXW7ri70n4UY6RJybvkPgTs2LSDuQahsar19B7cyNkrfN6O lLJWS2Gcj7BngrnSsyc/Epw4YTbTi6bqVVbWdU1+zlbxY+5wDxgYbqb5mk0fb7HTpHKZ d8JKtnABa/QC2CkoMnGKoJPxyzHJTPZvW7RCs+1n5J1oV8E13Gjgnb4gBlRPX2+13Jt0 pkSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id lx2-20020a17090b4b0200b002568a675b65si4118612pjb.141.2023.11.24.03.19.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 03:19:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 0D98881E7A65; Fri, 24 Nov 2023 03:19:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345830AbjKXLTS (ORCPT + 99 others); Fri, 24 Nov 2023 06:19:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345806AbjKXLTQ (ORCPT ); Fri, 24 Nov 2023 06:19:16 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 027D21709; Fri, 24 Nov 2023 03:19:21 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E62B61063; Fri, 24 Nov 2023 03:20:07 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.42.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 201613F7A6; Fri, 24 Nov 2023 03:19:17 -0800 (PST) Date: Fri, 24 Nov 2023 11:19:11 +0000 From: Mark Rutland To: Arnaldo Carvalho de Melo Cc: Ian Rogers , Marc Zyngier , Hector Martin , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1] perf parse-events: Make legacy events lower priority than sysfs/json Message-ID: References: <20231123042922.834425-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 24 Nov 2023 03:19:51 -0800 (PST) On Thu, Nov 23, 2023 at 06:32:51PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Nov 23, 2023 at 02:37:31PM +0000, Mark Rutland escreveu: > > Hi Ian, > > > > Thanks for this! > > Yeah, it seems we're making progress, thanks for the continuous effort > in getting this fixed! > > > On Wed, Nov 22, 2023 at 08:29:22PM -0800, Ian Rogers wrote: > > > The perf tool has previously made legacy events the priority so with > > > or without a PMU the legacy event would be opened: > > > > > > The bulk of this change is updating all of the parse-events test > > > expectations so that if a sysfs/json event exists for a PMU the test > > > doesn't fail - a further sign, if it were needed, that the legacy > > > event priority was a known and tested behavior of the perf tool. > > > > Signed-off-by: Ian Rogers > > > Regardless of my comments below, for this patch as-is: > > > Acked-by: Mark Rutland > > I'm collecting this even with the problems in some setups so far, thanks > for providing it. That's fine by me, thanks! > > > --- > > > This is a large behavioral change: > > > 1) the scope of the change means it should bake on linux-next and I > > > don't believe should be a 6.7-rc fix. > > > > I'm happy for this to bake, but I do think it needs to be backported for the > > sake of users, especially given that it *restores* the old behaviour. > > > > > 2) a fixes tag and stable backport I don't think are appropriate. > > > For the sake of users I think a fixes tag and stable backport are necssary. In > > practice distributions ship the perf tool associated with their stable kernel, > > so (for better or worse) a stable backport is certainly necessary for distros > > that'll use the v6.6 stable kernel. > > Which, as Ian mentioned, is a common misconception, as the lack of > lockstep of perf/kernel versions was never properly stated in > documentation, only in the source code, look for the > evsel__disable_missing_features() function that tries to do whatever we > managed to do from what was being asked (new features for old kernels) > and the laconic responses from perf_event_open() given back to those > requests. > > But the fact is that most if not all distros think perf is in lockstep > with the kernel, which is not the intent. Sorry, I didn't mean to imply that these were in lockstep. All I meant was: (a) Distributions typically ship a stable version of the perf tool, and don't update to the latest-and-greatest version, but will take stable bug fixes. Basically what they do for every other userspace application they ship. Distros with a rolling release policy will update, but they're not the common case today. (b) The tool version that distributions happen to ship is typically the same as the kernel version, since packagers will grab them at the same time, and they're in the same source tree anyway. ... and hence, if a distro uses kernel v6.6, they are *very* likely to also pick perf tool version v6.6. > That said, for distros that do backports, this is one to be done, and > for stable@kernel.org, yeah, I also think this is one to be flagged as > that, but since this hybrid thing has such a miscoordinated > user/kernel/arches history, with such great number of nuances and > interpretations, I think we better continue to test it for a while, in > perf-tools-next/perf-tools-next and linux-next, to the flag it for > backports. 100% agreed! Thanks, Mark.