Re: [PATCH] perf/x86: check ucode before disabling PEBS onSandyBridge

From: Peter Zijlstra
Date: Fri Jun 08 2012 - 09:54:37 EST


On Fri, 2012-06-08 at 15:51 +0200, Borislav Petkov wrote:
> Reportedly, there are some obscure systems which need different
> microcode versions per CPU:
>
> http://lkml.indiana.edu/hypermail/linux/kernel/1105.3/01010.html

*groan*,.. ok.

> > The biggest problem is finding when the minimum revision changes, at
> > best this is a n log n sorting problem due to the per-cpu setup, but I
> > couldn't be arsed to implement a tree or anything fancy since it all
> > stinks anyway.
>
> I know. Can't you just iterate over all CPUs and collect the lowest
> ucode version? Provided, of course, newer microcode versions means a
> higher version number.

That's what I do.. but that's O(n) per cpu, so if you update all cpus,
that's O(n^2).

You don't know when userspace is done updating the 'last' cpu, so you
have to scan all cpus for every cpu.

I'm sure the SGI people with their silly CPU counts aren't too thrilled
to have this.

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