Re: [patch] x86, perf: avoid spamming kernel log for bts buffer failure

From: Peter Zijlstra
Date: Wed Jul 02 2014 - 10:54:26 EST


On Wed, Jul 02, 2014 at 03:38:50PM +0200, Stephane Eranian wrote:
> On Wed, Jul 2, 2014 at 3:31 PM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> > Right, that'd suck. I suppose we could also change that to allocate the
> > DS resources on first demand and never free them again.
> >
> Some may argue that if you never use perf_event again, you are wasting
> (1 + 1 + 4) pages per CPU. That may not be okay on some systems.
>
> But yes, it would avoid this problem and also take the penalty for the allocs
> only once.

We could of course over engineer this and put a timer on them to free
after 5 minutes to avoid the alloc/free cycle for workloads that
create/destroy events a lot.

Attachment: pgpHKu0BBImLJ.pgp
Description: PGP signature