Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751848AbcCLHxb (ORCPT ); Sat, 12 Mar 2016 02:53:31 -0500 Received: from casper.infradead.org ([85.118.1.10]:51361 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbcCLHxW (ORCPT ); Sat, 12 Mar 2016 02:53:22 -0500 Date: Sat, 12 Mar 2016 08:53:13 +0100 From: Peter Zijlstra To: "Luck, Tony" Cc: Vikas Shivappa , "Shivappa, Vikas" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "hpa@zytor.com" , "tglx@linutronix.de" , "mingo@kernel.org" , "Shankar, Ravi V" , "Yu, Fenghua" , "Anvin, H Peter" Subject: Re: [PATCH V6 0/6] Intel memory b/w monitoring support Message-ID: <20160312075313.GH6344@twins.programming.kicks-ass.net> References: <1457652732-4499-1-git-send-email-vikas.shivappa@linux.intel.com> <20160311225427.GG6344@twins.programming.kicks-ass.net> <3908561D78D1C84285E8C5FCA982C28F3A00723E@ORSMSX114.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F3A00723E@ORSMSX114.amr.corp.intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 907 Lines: 25 On Sat, Mar 12, 2016 at 01:56:13AM +0000, Luck, Tony wrote: > Some tracing printk() show that we are calling update_sample() with totally bogus arguments. > > There are a few good calls, then I see rmid=-380863112 evt_type=-30689 first=0 > > That turns into a wild vrmid, and we fault accessing mbm_current->prev_msr It's because I'm a right idiot.. The below should sort that methinks. Will push a new branch --- a/arch/x86/events/intel/cqm.c +++ b/arch/x86/events/intel/cqm.c @@ -466,9 +466,9 @@ static bool is_mbm_event(int e) static void cqm_mask_call(struct rmid_read *rr) { if (is_mbm_event(rr->evt_type)) - on_each_cpu_mask(&cqm_cpumask, __intel_mbm_event_count, &rr, 1); + on_each_cpu_mask(&cqm_cpumask, __intel_mbm_event_count, rr, 1); else - on_each_cpu_mask(&cqm_cpumask, __intel_cqm_event_count, &rr, 1); + on_each_cpu_mask(&cqm_cpumask, __intel_cqm_event_count, rr, 1); } /*