Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753383Ab2FLRPH (ORCPT ); Tue, 12 Jun 2012 13:15:07 -0400 Received: from s15943758.onlinehome-server.info ([217.160.130.188]:58327 "EHLO mail.x86-64.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751306Ab2FLRPF (ORCPT ); Tue, 12 Jun 2012 13:15:05 -0400 Date: Tue, 12 Jun 2012 19:15:24 +0200 From: Borislav Petkov To: Stephane Eranian Cc: Robert Richter , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, andi@firstfloor.org, mingo@elte.hu, ming.m.lin@intel.com, Andreas Herrmann , Dimitri Sivanich , Dmitry Adamushko Subject: Re: [PATCH] perf/x86: check ucode before disabling PEBS on SandyBridge Message-ID: <20120612171524.GH8404@aftab.osrc.amd.com> References: <1339064319.23343.13.camel@twins> <1339065932.23343.18.camel@twins> <1339067757.23343.21.camel@twins> <20120608093513.GA22520@gmail.com> <1339149613.23343.52.camel@twins> <1339161972.2507.13.camel@laptop> <20120612170725.GE5046@erda.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1143 Lines: 31 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/