linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Antonov <alexander.antonov@linux.intel.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Jiri Olsa <jolsa@redhat.com>, Andi Kleen <ak@linux.intel.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Rogers <irogers@google.com>, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v4 1/5] perf stat: Add AGGR_PCIE_PORT mode
Date: Mon, 8 Feb 2021 14:30:21 +0300	[thread overview]
Message-ID: <b3cb656f-a57b-544a-67eb-3d25e85dc6b0@linux.intel.com> (raw)
In-Reply-To: <CAM9d7ciCGd+mkLOyJciB4Oe6XEoFyKx_=zhnK1SDnDM3=0M5NQ@mail.gmail.com>

On 2/4/2021 3:07 PM, Namhyung Kim wrote:
> Hello,
>
> On Wed, Feb 3, 2021 at 10:58 PM Alexander Antonov
> <alexander.antonov@linux.intel.com> wrote:
>> Adding AGGR_PCIE_PORT mode to be able to distinguish aggr_mode
>> for root ports in following patches.
> I'm not sure adding the AGGR_PCIE_PORT is the right way.
> In my understanding, the aggr mode is to specify how we aggregate
> counter values of a single event from different cpus.  But this seems
> to aggregate counter values from different events.  Also the new
> mode is basically the same as AGGR_GLOBAL.
>
> As you will add stat_config.iostat_run to distinguish the iostat
> command, probably we just want to use the global aggr mode
> (and it's the default!) and get rid of the AGGR_PCIE_PORT.
>
> Thoughts?
>
> Thanks,
> Namhyung
Hello Namhyung,

Actually, you are right. We aggregate counter values from different 
events of a
single IIO stack (PCIe root port) to calculate metrics for this IO stack.
But the reason is to prevent using of '-e' and '-M' options in 'iostat' mode
because it can be a reason for the mess in the output that can confuse 
users.

There is an idea to use your suggestion for this part:

status = iostat_prepare(...);
if (status < 0)
         goto out;
if (status == IOSTAT_LIST)
         iostat_list(...);
else
         ...

So, we can check if evlist is empty inside iostat_prepare(). If not, print
a warning, for example, "The -e and -M options are not supported. All chosen
events/metrics will be dropped". Then we can free of evlist by using
evlist__delete(), create new one by using evlist__new() and fill the evlist.

In this case the body of iostat_prepare() function would be:

iostat_prepare()
{
     If (!is_evlist_empty) {
         pr_warning();
         evlist__delete();
         evlist__new()
     }

     iostat_event_group();
}

It will allow to get rid of the AGGR_PCIE_PORT.
What do you think?

Thank you,
Alexander

  reply	other threads:[~2021-02-08 11:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 13:58 [PATCH v4 0/5] perf stat: Introduce iostat mode to provide I/O performance metrics Alexander Antonov
2021-02-03 13:58 ` [PATCH v4 1/5] perf stat: Add AGGR_PCIE_PORT mode Alexander Antonov
2021-02-04 12:07   ` Namhyung Kim
2021-02-08 11:30     ` Alexander Antonov [this message]
2021-02-10 10:02       ` Namhyung Kim
2021-02-03 13:58 ` [PATCH v4 2/5] perf stat: Basic support for iostat in perf Alexander Antonov
2021-02-04 12:22   ` Namhyung Kim
2021-02-08 11:55     ` Alexander Antonov
2021-02-10 10:07       ` Namhyung Kim
2021-02-03 13:58 ` [PATCH v4 3/5] perf stat: Helper functions for PCIe root ports list in iostat mode Alexander Antonov
2021-02-04 12:32   ` Namhyung Kim
2021-02-08 11:58     ` Alexander Antonov
2021-02-03 13:58 ` [PATCH v4 4/5] perf stat: Enable iostat mode for x86 platforms Alexander Antonov
2021-03-09  7:51   ` liuqi (BA)
2021-03-10 16:19     ` Alexander Antonov
2021-03-11  7:02       ` liuqi (BA)
2021-02-03 13:58 ` [PATCH v4 5/5] perf: Update .gitignore file Alexander Antonov
2021-02-03 20:55 ` [PATCH v4 0/5] perf stat: Introduce iostat mode to provide I/O performance metrics Arnaldo Carvalho de Melo
2021-02-04 12:35   ` Namhyung Kim

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=b3cb656f-a57b-544a-67eb-3d25e85dc6b0@linux.intel.com \
    --to=alexander.antonov@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).