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

From: Borislav Petkov
Date: Tue Jun 12 2012 - 13:15:02 EST


On Tue, Jun 12, 2012 at 07:09:19PM +0200, Stephane Eranian wrote:
> > Instead of registering a microcode notifier, why not checking the
> > availability of pebs dynamically with each syscall in
> > intel_pmu_hw_config()? It looks like intel_snb_verify_ucode() is not
> > that much expensive. We can perform the check only if the event could
> > be for pebs and if pebs is broken. The check could be repeated when
> > setting up a new event after ucode could potentially has been updated
> > (e.g. after bringing a cpu online or so).

Yes, this will obviate the need for touching the microcode driver at all.

> That's what I had in my original version.

... and you decided not to do it like that because... ?

Thanks.

--
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
--
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/