Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1525004pxf; Fri, 19 Mar 2021 09:00:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7A9ovZydkwqk/ulkPfNiSF2z+toCT9fbxdyn8zfdQTG3eMVIrzx5Gvqm79sHip+VIrjB9 X-Received: by 2002:a05:6402:138f:: with SMTP id b15mr10469636edv.121.1616169618381; Fri, 19 Mar 2021 09:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616169618; cv=none; d=google.com; s=arc-20160816; b=HApwX/n8HwhZ1iDfK4Hbo60Vc3mXfhKsIfj7IYp4uwGhH0HuSjg4ULyuiyoUlrLas/ jif1eZj/LVusqyOwYtzvaqsIFi6BdEhrk26f505MstU4+svWTtTI8+UAYZ1AEIB4z/vo geD+dJs9+ePX4UGopxpEam0+KjWwxJ7D5fopG9QKWS6TyzlCrcFkwJMZRUIAiTEO86eU X7BkZoziO1ImD8SWhnGu/L8ktXy/IeAHltnKCfqMDUwBklfSfhDrGzbBx/3Ez/Ty4AB8 WcCHxukChrh6vMd4Xl1A80A2l5Z1OcjdZCUuOwGXItsiMFlfij3R6WbtEtB6quRhKNFG XwEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=4cFU+mq+hQfxytugsIHjZGcBMJB6tJrIkc4/KKvWSLg=; b=kTYoONZJIkDWgcxmeinI9Sd/NDdWGz5d/wIzVE+tgcyTusvrs0ZRZI0AdFhwuJDTAv nFgDHbIGEt9J4IMkkSl6jdb7luXSwc71Zp38HDsyvKItRGt9dT2CJ3K7qqpyvRwgukQn jzLMq16P4zLO/Gf7S1tg50FlGuZbq2yT6rwxDky54AsvUwSD/COkElDm0gKMWokxgl2G h6UNQu+N3dcGUnsYNmW2224P4yImQoq0PsrVxQqpJFxzlg3gmdM9YDmiSaO/mgL182JY fGr4pi5OzyudOSc8x68MuM89qqweld4W3gTANSMee3Z1BI+lYnIOomBGpz31n98zwV6v t7eg== ARC-Authentication-Results: i=1; mx.google.com; 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 k4si4236581edq.442.2021.03.19.08.59.55; Fri, 19 Mar 2021 09:00:18 -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; 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 S230288AbhCSP6f (ORCPT + 99 others); Fri, 19 Mar 2021 11:58:35 -0400 Received: from mail-lj1-f172.google.com ([209.85.208.172]:37553 "EHLO mail-lj1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230517AbhCSP6W (ORCPT ); Fri, 19 Mar 2021 11:58:22 -0400 Received: by mail-lj1-f172.google.com with SMTP id r20so12610417ljk.4 for ; Fri, 19 Mar 2021 08:58:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4cFU+mq+hQfxytugsIHjZGcBMJB6tJrIkc4/KKvWSLg=; b=BOgF1I6t9WyWXkJuVHLtiiBmWk6jKFWABQc94bF3r5VsEMVuJgGVpt7flN2f3iotCK jSpm0aQLalZumRdTj0whA4naLSlaggSTzE38tzTkmooy4fX9KYn1aQif+KwimPZ50S5Q 10LYwPC5SJ9Zq7o7N1pevanjGRr/DG4/4nrcxCz6DhlwbTiPrap8Vch+ulVA5Pkgk0fT P426FLYst7sfPSGI7r6MQhfl/byc9oKhtlLGa2WWfxcOxnUClX+ZQ2w76wIggwU90pCM 909HrSsGY9CsOggUteZOrjGpTau84N4FDVqSnf8rYEtehJy9U+5l28XCGD6TAm7RqDSi 120g== X-Gm-Message-State: AOAM530PqcKxbM2usikWgDNQoung7it5mu2VPdYpwKKwDWDHhbVziAnN kwztdrCmUjXhoIg1JzywO0qzcPXa5IS8i38ariw= X-Received: by 2002:a05:651c:1055:: with SMTP id x21mr1283530ljm.275.1616169501522; Fri, 19 Mar 2021 08:58:21 -0700 (PDT) MIME-Version: 1.0 References: <20210316211837.910506-1-songliubraving@fb.com> <7D48A756-C253-48DE-B536-826314778404@fb.com> <388AF530-5176-4DB9-93C4-6C302432CE12@gmail.com> <3E65B60E-B120-4E1A-BAF2-2FAEF136A4CD@fb.com> In-Reply-To: From: Namhyung Kim Date: Sat, 20 Mar 2021 00:58:10 +0900 Message-ID: Subject: Re: [PATCH v2 0/3] perf-stat: share hardware PMCs with BPF To: Arnaldo Carvalho de Melo Cc: Song Liu , Jiri Olsa , linux-kernel , Kernel Team , Jiri Olsa Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, 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. :) Thanks, Namhyung