Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753771AbcCWUOn (ORCPT ); Wed, 23 Mar 2016 16:14:43 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:33150 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752206AbcCWUOm (ORCPT ); Wed, 23 Mar 2016 16:14:42 -0400 Date: Wed, 23 Mar 2016 20:14:38 +0000 From: Matt Fleming To: Vikas Shivappa Cc: hpa@zytor.com, eranian@google.com, linux-kernel@vger.kernel.org, tony.luck@intel.com, brgerst@gmail.com, peterz@infradead.org, bp@alien8.de, tglx@linutronix.de, dsahern@gmail.com, dvlasenk@redhat.com, jolsa@redhat.com, luto@amacapital.net, mingo@kernel.org, acme@redhat.com, torvalds@linux-foundation.org, namhyung@kernel.org, vincent.weaver@maine.edu, alexander.shishkin@linux.intel.com, linux-tip-commits@vger.kernel.org Subject: Re: [tip:perf/urgent] perf/x86/cqm: Fix CQM handling of grouping events into a cache_group Message-ID: <20160323201438.GH11676@codeblueprint.co.uk> References: <1457652732-4499-2-git-send-email-vikas.shivappa@linux.intel.com> <20160321145741.GC11676@codeblueprint.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 831 Lines: 21 On Mon, 21 Mar, at 11:14:37AM, Vikas Shivappa wrote: > > > Before MBM , the below condition was never hit because we had only one event ? > > - if (a->hw.target == b->hw.target) > + if (a->hw.target == b->hw.target) { > + b->hw.is_group_event = true; > > We are trying to address this for cases where different MBM(local or total) > and cqm events are grouped into one RMID. I can't test these changes, so I'm only working from memory, but I seem to recall that this condition is hit if monitoring simultaneously from two invocations of perf. It's also possible to have pid/tid groups overlapping, and that needs to be handled. > Which is the case which led to duplicate values ? Good question. Try monitoring a multithread process with these changes and see if you get duplicate values reported.