[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100902203608.GA5914@lenovo>
Date: Fri, 3 Sep 2010 00:36:08 +0400
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Don Zickus <dzickus@...hat.com>
Cc: mingo@...e.hu, peterz@...radead.org, robert.richter@....com,
fweisbec@...il.com, linux-kernel@...r.kernel.org,
ying.huang@...el.com, ming.m.lin@...el.com, yinghai@...nel.org,
andi@...stfloor.org, eranian@...gle.com
Subject: Re: [PATCH 1/3] perf, x86: Fix accidentally ack'ing a second event
on intel perf counter
On Thu, Sep 02, 2010 at 04:00:21PM -0400, Don Zickus wrote:
> On Thu, Sep 02, 2010 at 11:26:27PM +0400, Cyrill Gorcunov wrote:
> > Lets assume 1 counters is triggered and global bit is set as well
> >
> > we have here
> >
> > status = intel_pmu_get_status();
> >
> > > perf_sample_data_init(&data, 0);
> > >
> > > @@ -728,6 +728,7 @@ static int intel_pmu_handle_irq(struct pt_regs *regs)
> > >
> > > loops = 0;
> > > again:
> > > + intel_pmu_ack_status(status);
> >
> > So here we write just being read value back to CTRL register and _if_ new
> > overflow happened in this window we've cleared it without processing.
>
> No, you have to write a '1' to clear. If a new bit is set after we read
> it, then our 'status' var should have a '0' in that bit and thus will not
> get cleared when we ack it.
>
Yeah, messed {0;1} values, thanks!
> Cheers,
> Don
>
-- Cyrill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists