[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPqkBSzTGb4zxOdK4Qi5d-Bir5F2DjUR8sHXQ+=ikic7N_JWw@mail.gmail.com>
Date: Fri, 19 Jan 2018 12:18:50 -0800
From: Stephane Eranian <eranian@...gle.com>
To: "Liang, Kan" <kan.liang@...el.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"acme@...nel.org" <acme@...nel.org>,
"ak@...ux.intel.com" <ak@...ux.intel.com>
Subject: Re: [PATCH V5 4/8] perf/x86/intel/uncore: add new data structures for
free running counters
On Fri, Jan 19, 2018 at 10:00 AM, Liang, Kan <kan.liang@...el.com> wrote:
>
> > On Fri, Jan 19, 2018 at 9:53 AM, Liang, Kan <kan.liang@...el.com> wrote:
> > >> On Fri, Jan 19, 2018 at 03:15:00PM +0000, Liang, Kan wrote:
> > >> > >
> > >> > > On Thu, Jan 18, 2018 at 05:43:10PM +0000, Liang, Kan wrote:
> > >> > > > In the uncore document, there is no event-code assigned to free
> > >> > > > running
> > >> > > counters.
> > >> > > > Some events need to be defined to indicate the free running
> > counters.
> > >> > > > The events are encoded as event-code + umask-code.
> > >> > > >
> > >> > > > The event-code for all free running counters is 0xff, which is
> > >> > > > the same as the fixed counters.
> > >> > >
> > >> > > Is it possible to count the same things using the generic counters?
> > >> > >
> > >> >
> > >> > Yes, there are events for generic counters to count bandwidth and
> > >> > utilization.
> > >> >
> > >> > The reasons of introducing free running counters are
> > >> > - To provide highly valuable information (bandwidth and utilization)
> > >> > which most of the customers are interested in
> > >> > - To save on the precious generic counters
> > >>
> > >> _IF_ the exact same counters are available on the GPs then we must
> > >> use the same event code for them and use event scheduling to place
> > >> them on fixed/free-running counters when possible.
> > >
> > > OK. I will check if there are the exact same events on GPs for those
> > > free running counters.
> > >
> > You can measure the bandwidth and utilization on the GP. I am doing it all
> > the time.
>
> Oh, think a bit more.
> I think we cannot do the same thing as we did for CPU PMU's fixed counters.
>
> The counters here are free running counters. They cannot be start/stop.
>
I think they can because this is all controlled by the event software state. You
don't need to read the hw counter each time. If the event is inactive, you
return the saved 64-bit counter value. And I believe, this is independent from
scheduling.
>
> Thanks,
> Kan
>
> >
> > > Thanks,
> > > Kan
> > >
> > >>
> > >> That's what we do for the CPU PMU's fixed counters too.
> > >>
> > >> Don't invent magic event codes just because.
Powered by blists - more mailing lists