Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4575252pxf; Tue, 23 Mar 2021 14:12:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycpFM/0LzmmsfiHswsVJ+YfTMvT4yNmQxB3tB5GW21x0Da4M8TG1azyEAFBglDfUSdvlFL X-Received: by 2002:a17:906:bfcc:: with SMTP id us12mr173867ejb.266.1616533949025; Tue, 23 Mar 2021 14:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616533949; cv=none; d=google.com; s=arc-20160816; b=IIc9+83pCjxEdEiCQfMeVR0rFxkMYuxKzDhm+Pwn1B7JOwmP46jqOr/7qZmLrMimqg KyTaNKlAw1pOH1y5MaeRkuC7cuaXGoEkZHmiQvqYLkjI2GHylRbyQA3XadckYZ+eBVPu 6/Une9YdUFJrDZw6TS1cUUzkkvXheywN61oVYJvsBDU8g9/dVRMfXxU5l5MQDn2mcAOM 9vVAgWPVZLh/gpF2alqRECW1FAikwsI2jy43ROFfK0gXWUIiPhhbFivMeovKNvNGtaIp e9zm4hkq7J0HwFbhl4aP3PRuR7oUe1br5Ds5pd0jLNyizmIbmneZoDdZc2Wnn4TicaxT 4aPQ== 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=DdrhA2z5se3dRZD4VAWjh4pngT253TQzqPUPOkTOgtg=; b=0tBNFhfddJOFKWGNFMGitd6iJz5BigtzUyp9p4mZxHFmppfcRTG2+bnUFTNfU5XxQN SF7owOLQkuTYW5ws3AWJndVy5EaK6OhRPYQdZWo31X1Svz8lp1aCRRQ6du98gjI+rnTy uMlJ7cBkn0eASLKbchBARENMQJKv7t1N7aENOzLDVwUwrdnRAUCAoMZvC1htuzHoAe5M 12TmAbowYehEi647KhVh58Kn6oLRg6vUpjlrA05K2/A/A2wP22mu06VPzTDnc0PtPMPB Kj7hkddTII4r2qfaWErsnQFsHqBY1D/MxDHr8y59/zkDhDLAgt90rxkdUn1dI7moWsU6 TK3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aGhiM384; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l19si113257edq.269.2021.03.23.14.12.04; Tue, 23 Mar 2021 14:12:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aGhiM384; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233409AbhCWVKf (ORCPT + 99 others); Tue, 23 Mar 2021 17:10:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:55794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233422AbhCWVKZ (ORCPT ); Tue, 23 Mar 2021 17:10:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E453A61879; Tue, 23 Mar 2021 21:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616533825; bh=5wLyszeDlfv5Q/EYQhea3G/TbWg2xXnHCAzAJckahp4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aGhiM384dXnlO0fgh+n5l21MuSHW7KSMBvyy9NbD/rZuwbXyIgdi+DZGf1XlU5w1m PnMBT8Qmz5V5TB0xsiS9YQYW7lCBe0XVoAK3OHZeLq5k+n0QBbPhXPI2IgDZ+SYIsl mons35+/A9oqior0TnWKdf8IBU7I2o6EePDAmIgElA/84H5OTTuKPSiHGPgtUp9aE2 MA54Zp9G/wIkpKNXXBL6kU7IZnerYaCSiOBruPHhlnaEEEeHVtDoUzNJrfe75K5I63 oEqUFRnF3N6UZi/1Ikcw4M43MK8UjMxGtwGMx3S1tCBapB/Jvwf8Noqs/kh5yUbFjZ zSiQBxTrooG7A== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id EB50240647; Tue, 23 Mar 2021 18:10:22 -0300 (-03) Date: Tue, 23 Mar 2021 18:10:22 -0300 From: Arnaldo Carvalho de Melo To: Song Liu Cc: Namhyung Kim , Jiri Olsa , linux-kernel , Kernel Team , Jiri Olsa Subject: Re: [PATCH v2 0/3] perf-stat: share hardware PMCs with BPF Message-ID: References: <7D48A756-C253-48DE-B536-826314778404@fb.com> <388AF530-5176-4DB9-93C4-6C302432CE12@gmail.com> <3E65B60E-B120-4E1A-BAF2-2FAEF136A4CD@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Mar 19, 2021 at 04:14:42PM +0000, Song Liu escreveu: > > On Mar 19, 2021, at 8:58 AM, Namhyung Kim wrote: > > On Sat, Mar 20, 2021 at 12:35 AM Arnaldo Carvalho de Melo wrote: > >> Em Fri, Mar 19, 2021 at 09:54:59AM +0900, Namhyung Kim escreveu: > >>> On Fri, Mar 19, 2021 at 9:22 AM Song Liu wrote: > >>>>> On Mar 18, 2021, at 5:09 PM, Arnaldo wrote: > >>>>> On March 18, 2021 6:14:34 PM GMT-03:00, Jiri Olsa wrote: > >>>>>> On Thu, Mar 18, 2021 at 03:52:51AM +0000, Song Liu wrote: > >>>>>>> perf stat -C 1,3,5 107.063 [sec] > >>>>>>> perf stat -C 1,3,5 --bpf-counters 106.406 [sec] > >>>>>> I can't see why it's actualy faster than normal perf ;-) > >>>>>> would be worth to find out > >>>>> Isn't this all about contended cases? > >>>> Yeah, the normal perf is doing time multiplexing; while --bpf-counters > >>>> doesn't need it. > >>> Yep, so for uncontended cases, normal perf should be the same as the > >>> baseline (faster than the bperf). But for contended cases, the bperf > >>> works faster. > >> The difference should be small enough that for people that use this in a > >> machine where contention happens most of the time, setting a > >> ~/.perfconfig to use it by default should be advantageous, i.e. no need > >> to use --bpf-counters on the command line all the time. > >> So, Namhyung, can I take that as an Acked-by or a Reviewed-by? I'll take > >> a look again now but I want to have this merged on perf/core so that I > >> can work on a new BPF SKEL to use this: > > I have a concern for the per cpu target, but it can be done later, so > > Acked-by: Namhyung Kim > >> https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/log/?h=tmp.bpf/bpf_perf_enable > > Interesting! Actually I was thinking about the similar too. :) > > Hi Namhyung, Jiri, and Arnaldo, > > Thanks a lot for your kind review. > > Here is updated 3/3, where we use perf-bench instead of stressapptest. I had to apply this updated 3/3 manually, as there was some munging, its all now at: https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/log/?h=tmp.perf/core Please take a look at the "Committer testing" section I added to the main patch, introducing bperf: https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=tmp.perf/core&id=7fac83aaf2eecc9e7e7b72da694c49bb4ce7fdfc And check if I made any mistake or if something else could be added. It'll move to perf/core after my set of automated tests finishes. - Arnaldo