Re: [PATCH v1 1/2] perf/core: Use sysctl to turn on/off dropping leaked kernel samples

From: Mark Rutland
Date: Tue Jun 19 2018 - 02:01:59 EST


On Tue, Jun 19, 2018 at 09:39:02AM +0800, Jin, Yao wrote:
>
>
> On 6/18/2018 6:45 PM, Peter Zijlstra wrote:
> > On Mon, Jun 18, 2018 at 02:55:32PM +0800, Jin, Yao wrote:
> > > Thanks for providing the patch. I understand this approach.
> > >
> > > In my opinion, the skid window is from counter overflow to interrupt
> > > delivered. While if the skid window is too *big* (e.g. user -> kernel), it
> > > should be not very useful. So personally, I'd prefer to drop the samples.
> >
> > I really don't get your insitence on dropping the sample. Dropping
> > samples is bad. Furthermore, doing what Mark suggests actually improves
> > the result by reducing the skid, if the event happened before we entered
> > (as it damn well should) then the user regs, which point at the entry
> > site, are a better approximation than our in-kernel set.
> >
> > So not only do you not loose the sample, you actually get a better
> > sample.
> >
>
> OK, that's fine, thanks!
>
> I guess Mark will post this patch, right?

I'll try to spin something shortly -- I'm just figuring out how this should
work with guest sampling.

Thanks,
Mark.