[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW7qnu4aaTNKigQdbfGO83Ku22DQm+_xzOXnMW=r6=oTww@mail.gmail.com>
Date: Mon, 27 Sep 2021 13:17:53 -0700
From: Song Liu <song@...nel.org>
To: Stephane Eranian <eranian@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
open list <linux-kernel@...r.kernel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Jiri Olsa <jolsa@...hat.com>, kim.phillips@....com,
Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>
Subject: Re: [PATCH v1 00/13] perf/x86/amd: Add AMD Fam19h Branch Sampling support
Hi Stephane,
On Tue, Sep 14, 2021 at 10:57 PM Stephane Eranian <eranian@...gle.com> wrote:
>
> On Thu, Sep 9, 2021 at 1:55 AM Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > On Thu, Sep 09, 2021 at 12:56:47AM -0700, Stephane Eranian wrote:
> > > This patch series adds support for the AMD Fam19h 16-deep branch sampling
> > > feature as described in the AMD PPR Fam19h Model 01h Revision B1 section 2.1.13.
> >
> > Yay..
> >
> > > BRS interacts with the NMI interrupt as well. Because enabling BRS is expensive,
> > > it is only activated after P event occurrences, where P is the desired sampling period.
> > > At P occurrences of the event, the counter overflows, the CPU catches the NMI interrupt,
> > > activates BRS for 16 branches until it saturates, and then delivers the NMI to the kernel.
> >
> > WTF... ?!? Srsly? You're joking right?
> >
>
> As I said, this is because of the cost of running BRS usually for
> millions of branches to keep only the last 16.
> Running branch sampling in general on any arch is never totally free.
Could you please share some data on how expensive the BRS is? We are
hoping to use
BRS/LBR without PMI (bpf_get_branch_snapshot). If it is too expensive,
we may need
some heuristic to turn it on/off.
Thanks,
Song
Powered by blists - more mailing lists