[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180210140910.GQ25201@hirez.programming.kicks-ass.net>
Date: Sat, 10 Feb 2018 15:09:10 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: mingo@...hat.com, linux-kernel@...r.kernel.org, acme@...nel.org,
tglx@...utronix.de, jolsa@...hat.com, eranian@...gle.com,
ak@...ux.intel.com
Subject: Re: [PATCH V3 1/5] perf/x86/intel: fix event update for auto-reload
On Fri, Feb 09, 2018 at 10:49:35AM -0500, Liang, Kan wrote:
>
>
> On 2/9/2018 9:09 AM, Peter Zijlstra wrote:
> > On Tue, Feb 06, 2018 at 12:58:23PM -0500, Liang, Kan wrote:
> > >
> > >
> > > > With the exception of handling 'empty' buffers, I ended up with the
> > > > below. Please try again.
> > > >
> > >
> > > There are two small errors. After fixing them, the patch works well.
> >
> > Well, it still doesn't do A, two read()s without PEBS record in between.
> > So that needs fixing. What 3/5 does, call x86_perf_event_update() after
> > drain_pebs() is actively wrong after this patch.
> >
>
> As my understanding, for case A, drain_pebs() will return immediately. It
> cannot reach the patch.
> Because there is no PEBS record ready. So the ds->pebs_index should be the
> same as ds->pebs_buffer_base.
Right, so fix that.
> 3/5 is to handle case A.
3/5 is terminatlly broken, you should not call x86_perf_event_update()
on a auto-reload event _ever_ after my patch.
Powered by blists - more mailing lists