Re: [PATCH 5/6] perf_counter: kerneltop: mmap_pages argument

From: Peter Zijlstra
Date: Wed Mar 25 2009 - 08:27:36 EST


On Wed, 2009-03-25 at 13:18 +0100, Ingo Molnar wrote:
> * Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
>
> > provide a knob to set the number of mmap data pages.
>
> > + " -m pages --mmap_pages=<pages> # number of mmap data pages\n"
>
> Btw., we really want this to be auto-tuning to a large degree. If
> the kernel observes missed events, it should create a
> PERF_EVENT_OVERFLOW==0x3 record, with the number of missed events -
> or something like that.

Well, who's to say we ever see that overflow record if we're having
trouble tracking the output as is?

How important is it for people to have accurate overflow information
other than the current -- we can't keep up -- kind?

One possible solution is making the control page writable and writing
the userspace read position to it, then the kernel can, on
perf_output_begin() detect the overflow and count the number of
overwritten events.

This overflow count could then be published back into the control page.

TBH I'm not much of a fan, making all these pages writable just opens a
whole can of worms, and that accurate overflow tracking will put more
code in the output path.

Also, when mixing streams (events,mmap) is a single: you missed 'n'
events still good?



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/