Re: [PATCH] perf_events: fix and improve x86 event scheduling

From: Peter Zijlstra
Date: Mon Nov 07 2011 - 09:57:14 EST


On Mon, 2011-11-07 at 13:52 +0000, Stephane Eranian wrote:
> But given we limit the number of events to that of counters,
> we do have O(c^3).

Right, but SNB without HT gives you 8 GP counters, yielding a rather big
number. Suppose you're trying to fill it with 9 cycle events (1 for the
fixed purpose thingy), that'll end up being: 9^3 = 729 = big number.

(arguably adding 9 cycle counters is a tad retarded, but hey ;-)

It would be good to try and get it down to somewhere near 81 again,
although my brain isn't currently providing any sane ideas on how.

> As for the map_idx, it's there to track the position of each event in the
> initial event list. We shuffle events between constrained and unconstrained.
> By stashing the map_idx in the hw_perf_event struct we avoid having to
> pass around yet another array.

Yeah, I saw why you needed it..
--
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/