[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFpZPijlMSyfIVbl@kernel.org>
Date: Tue, 23 Mar 2021 18:10:22 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Song Liu <songliubraving@...com>
Cc: Namhyung Kim <namhyung@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Kernel Team <Kernel-team@...com>, Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH v2 0/3] perf-stat: share hardware PMCs with BPF
Em Fri, Mar 19, 2021 at 04:14:42PM +0000, Song Liu escreveu:
> > On Mar 19, 2021, at 8:58 AM, Namhyung Kim <namhyung@...nel.org> wrote:
> > On Sat, Mar 20, 2021 at 12:35 AM Arnaldo Carvalho de Melo <acme@...nel.org> 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 <songliubraving@...com> wrote:
> >>>>> On Mar 18, 2021, at 5:09 PM, Arnaldo <arnaldo.melo@...il.com> wrote:
> >>>>> On March 18, 2021 6:14:34 PM GMT-03:00, Jiri Olsa <jolsa@...hat.com> 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 <namhyung@...nel.org>
> >> 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
Powered by blists - more mailing lists