[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180119213355.GE2269@hirez.programming.kicks-ass.net>
Date: Fri, 19 Jan 2018 22:33:55 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Andi Kleen <ak@...ux.intel.com>
Cc: "Liang, Kan" <kan.liang@...el.com>,
Stephane Eranian <eranian@...gle.com>,
"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>
Subject: Re: [PATCH V5 4/8] perf/x86/intel/uncore: add new data structures
for free running counters
On Fri, Jan 19, 2018 at 12:24:17PM -0800, Andi Kleen wrote:
> > 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.
>
> Yes free running counter have completely different semantics. They
> need a separate event code.
The only thing that matters is if they count the same thing or not.
The not start/stop thing is not important. See arch/x86/events/msr.c on
how to deal with that. The short story is that you simply ignore stop
and update the prev_count on start. Then any next update will increment
with the correct delta.
(if the counter is short you also need to run a timer to deal with
wraps).
Powered by blists - more mailing lists