Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp625792rdh; Thu, 23 Nov 2023 13:37:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5dfLcOjZ0iHQmKPOuQHVI8137WTKeVUGFDI5RdgLyVjQXFkmfaa1fMpAIvnevS7zfp04n X-Received: by 2002:a05:6830:2b14:b0:6d3:16dc:8b50 with SMTP id l20-20020a0568302b1400b006d316dc8b50mr1005419otv.8.1700775473169; Thu, 23 Nov 2023 13:37:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700775473; cv=none; d=google.com; s=arc-20160816; b=rhp2op9G8HPdtByrnDf4sEFDzawuQEApERDTcdYkkyzI1684fpzaW6LLVxk+HgRAx0 Nv6VQk7NWNlcocmSpvFJISy51T4yqugnfzIUPoTizN/I9ANJpAQiR+zo4QDmf9zNCCso +lcPZIH+wJ2gB/o5n7F+4iC+hTyuvvzVfbNezN5WUFuTHMAhUppH+VE4zJb3CTcZKD1B +0HXZR1EEIfCSIu6Z/wa8MGxrrUzUpjsjYu4zqT13juS8AZcqZdN2mZ2xwgtz85nai9c V+aooHElDZBji4ZfwRguE17UftDojicW0unCLYxHH3AIA/RkSjSMUuBRErAbisSZPrDU n+Bw== 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=L5vq8sVowvXn215e+kBEz/LzZZ+PD3ftL0LosboRjI8=; fh=zq/9HbB3MgKQ7g3twyDtwpmEa2Jxc2ITp1pgddx1Bdg=; b=IB1iXFKJ5VyN3wgfxk8Fu+dvTcqglawvLIXpAwqZtWnnI19mRpO1MJOe69Mr7JEzXH iybt9xluJkwbS1/Tn75IY7eaFmrBurfWjeGB7o/DYhFmYBUudhXge6Ow54wVi/t342zh FDdnTP1+cN4IX7pCJN4lwOGymwe4SDDwJ2wup36Tj5CnLua7cezcbqrmnjcMDfO+56sA DHozg9p5j6s3mYI+DvjF1ACzOkDrlNkPMOvbLZbsQMjlFfx61d5kw40RSSI98MUjlOv+ nrfRHlragY1Jctqx/VfiF40LhEpih6ITjvmBtuRJfmZakkPGB47bibXoRF9l4/4mgJat c6RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZL3+ID0n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z11-20020a65610b000000b005b90af1943asi2013989pgu.807.2023.11.23.13.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 13:37:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZL3+ID0n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5F46E806293F; Thu, 23 Nov 2023 13:37:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229478AbjKWVct (ORCPT + 99 others); Thu, 23 Nov 2023 16:32:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjKWVcs (ORCPT ); Thu, 23 Nov 2023 16:32:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0767AD for ; Thu, 23 Nov 2023 13:32:54 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DA4BC433CA; Thu, 23 Nov 2023 21:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700775174; bh=EJrVqrprMxLs4WMWlL05MhTf0n0/Q9nUsytRTZI/d+g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZL3+ID0ndJJL3M/cuMNcG1XIlie8Hvdz9NNpc7AdcSp41bhttRGAOP7Nl7uQnxkeh gbLpzILeqsOWMcdF+Wwe1s8FS4lJmt2bg2Ne4mDVJfwbEj6BCSQY3+8eSi8+LPwjUr A5lgWeGYchJUQjRA21fOGpFqxDyMhIPmReuJJ25vm1AgrcXD8S4ebLNe8zOZA8a1B+ 9DU091vhc+PlRY4bTHZMySJkD+S0G2YNn/7UkGDfk9NjJMx+QJ1D0PeqYL/WA+S2Nc I9mBCi/5AbOQNUrI4TwcJmxcr0GxTljeY1Fbt38K2Aflk1f/D2qZjQNZwFFRu56HgT VSC/vuK/KpE6A== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id A14DB40094; Thu, 23 Nov 2023 18:32:51 -0300 (-03) Date: Thu, 23 Nov 2023 18:32:51 -0300 From: Arnaldo Carvalho de Melo To: Mark Rutland 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-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 23 Nov 2023 13:37:50 -0800 (PST) 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. > > --- > > 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. 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. > > The real reported issue is with the PMU driver. > > Having trawled through the driver and core perf code, I don't believe the PMU > driver is at fault. Please see my analysis at: > > https://lore.kernel.org/lkml/ZV9gThJ52slPHqlV@FVFF77S0Q05N.cambridge.arm.com/ > > ... where it looks like the perf tool is dropping the extended type ID in some > cases. > If you know of a specific bug in the PMU driver or perf core code, please let > me know and I will investigate. As it stands we have no evidence of a bug in > the PMU driver, and pretty clear evidence (as linked above) there there is > *some* issue in userspace. In the absence of such evidence, please don't assert > that there must be a kernel bug. > > A backport would bring the > > risk that later fixes, due to the large behavior change, wouldn't be > > backported and past releases get regressed in scenarios like > > hybrid. Backports for the perf tool are also less necessary than say a > > buggy PMU driver, as distributions should be updating to the latest > > perf tool regardless of what Linux kernel is being run (the perf tool > > is backward compatible). > As above I believe that a backport is necessary. Agreed, as we get this tested a bit. - Arnaldo