Re: [PATCH 4/4] perf, x86: Fix event scheduler to solve complexscheduling problems

From: Ingo Molnar
Date: Sun Apr 17 2011 - 04:18:56 EST



* Robert Richter <robert.richter@xxxxxxx> wrote:

> > I'd really prefer not to do this for .39, and I'll have to sit down and
> > actually read this code. It looks like we went from O(n^2) to O(n!) or
> > somesuch, also not much of an improvement. I'll have to analyze the solver
> > to see what it does for 'simple' constraints set to see if it will indeed
> > be more expensive than the O(n^2) solver we had.
>
> It wont be more expensive, if there is a solution. But if there is no one we
> walk all possible ways now which is something like O(n!).

So with 6 counters it would be a loop of 720, with 8 counters a loop of 40320,
with 10 counters a loop of 3628800 ... O(n!) is not fun.

Thanks,

Ingo
--
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/