mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: Stephane Eranian <eranian@google.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	"Hunter, Adrian" <adrian.hunter@intel.com>,
	David Ahern <dsahern@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	"mingo@redhat.com" <mingo@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] perf,tools: check and re-organize evsel cpu maps
Date: Thu, 2 Jul 2015 18:10:37 +0200	[thread overview]
Message-ID: <20150702161037.GB19742@krava.brq.redhat.com> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F07701883865@SHSMSX103.ccr.corp.intel.com>

On Tue, Jun 30, 2015 at 04:45:18PM +0000, Liang, Kan wrote:
> 
> > 
> > On Mon, Jun 29, 2015 at 12:55 PM, <kan.liang@intel.com> wrote:
> > >
> > > From: Kan Liang <kan.liang@intel.com>
> > >
> > > 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 "<not counted>",
> 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

  reply	other threads:[~2015-07-02 16:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29 19:55 [PATCH 1/2] perf,tools: get correct cpu id for print_aggr kan.liang
2015-06-29 19:55 ` [PATCH 2/2] perf,tools: check and re-organize evsel cpu maps kan.liang
2015-06-30 12:14   ` Jiri Olsa
2015-06-30 13:42     ` Liang, Kan
2015-06-30 13:54       ` Jiri Olsa
2015-06-30 14:42         ` acme
2015-07-02 16:08           ` Jiri Olsa
2015-06-30 15:52   ` Stephane Eranian
2015-06-30 16:45     ` Liang, Kan
2015-07-02 16:10       ` Jiri Olsa [this message]
2015-06-30  6:46 ` [PATCH 1/2] perf,tools: get correct cpu id for print_aggr Jiri Olsa
2015-06-30 13:24   ` Liang, Kan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150702161037.GB19742@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®