Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753328AbbGBQKs (ORCPT ); Thu, 2 Jul 2015 12:10:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45064 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753772AbbGBQKl (ORCPT ); Thu, 2 Jul 2015 12:10:41 -0400 Date: Thu, 2 Jul 2015 18:10:37 +0200 From: Jiri Olsa To: "Liang, Kan" Cc: Stephane Eranian , Arnaldo Carvalho de Melo , Jiri Olsa , "ak@linux.intel.com" , Namhyung Kim , "Hunter, Adrian" , David Ahern , Peter Zijlstra , "mingo@redhat.com" , LKML Subject: Re: [PATCH 2/2] perf,tools: check and re-organize evsel cpu maps Message-ID: <20150702161037.GB19742@krava.brq.redhat.com> References: <1435607735-6332-1-git-send-email-kan.liang@intel.com> <1435607735-6332-2-git-send-email-kan.liang@intel.com> <37D7C6CF3E00A74B8858931C1DB2F07701883865@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F07701883865@SHSMSX103.ccr.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2195 Lines: 48 On Tue, Jun 30, 2015 at 04:45:18PM +0000, Liang, Kan wrote: > > > > > On Mon, Jun 29, 2015 at 12:55 PM, wrote: > > > > > > From: Kan Liang > > > > > > Some PMU events have cpumask, e.g uncore events. The cpu list set by > > > user may be incompatible with event's cpumask. > > > This patch will check the user defined cpu list. If the incompatible > > > cpu is found, it will warn the user and discard the incompatible cpu. > > > Only available cpu can be stored in evsel->cpus->map. If there is no > > > cpu from cpu list compatible with event's cpumask. It will error out. > > > > > > Here is an example. > > > According to cpumask, uncore should only available on CPU0 and CPU18. > > > So the S0-C1 for uncore should not count. > > > > > I don't think this is correct. The cpumask is a default set of CPUs to be used > > by perf. The cpumask does not indicate the ONLY CPUs on which to > > monitor. It is just a default. You can monitor an uncore event using a CPU > > not listed in the cpumask, unless the kernel code has changed recently. If > > you are not on the default CPUs, the kernel will IPI. > > > > Here I mean that the S0-C1 for uncore should show "", > as we showed the same thing on "perf stat -a --per-core". > > Yes, in theory, user can use a CPU not listed in the cpumask. Because > uncore is per-socket event. > However, it brings error and confusion. > - As the below example, if we run -C0,1, we get two results for socket 0. > I think it's incorrect. Per-socket event should only have one result > per socket. > - Since the cpumask has already been exported to user space, I think users > should follow it. Otherwise, why we export cpumask to user space? > Implicitly changing the monitored CPU in kernel is not a good way I think. I dont follow uncore stuff much :-\ Stephane, does this make sense to you ^^^ ? please check v2 thanks, jirka -- 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/