From: Jiri Olsa <jolsa@redhat.com>
To: "Jin, Yao" <yao.jin@linux.intel.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
mingo@redhat.com, alexander.shishkin@linux.intel.com,
Linux-kernel@vger.kernel.org, ak@linux.intel.com,
kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v1 2/2] perf header: Support hybrid CPU_PMU_CAPS
Date: Thu, 6 May 2021 15:22:35 +0200 [thread overview]
Message-ID: <YJPtmyzTEe/IUID4@krava> (raw)
In-Reply-To: <c0bd3baa-3209-23f3-7058-c6908434de2d@linux.intel.com>
On Thu, May 06, 2021 at 12:59:08PM +0800, Jin, Yao wrote:
> Hi Jiri,
>
> On 5/4/2021 11:07 PM, Jiri Olsa wrote:
> > On Fri, Apr 30, 2021 at 03:46:02PM +0800, Jin Yao wrote:
> > > On hybrid platform, it may have several cpu pmus, such as,
> > > "cpu_core" and "cpu_atom". The CPU_PMU_CAPS feature in perf
> > > header needs to be improved to support multiple cpu pmus.
> > >
> > > The new layout in header is defined as:
> > >
> > > <nr_caps>
> > > <caps string>
> > > <caps string>
> > > <pmu name>
> > > <nr of rest pmus>
> >
> > not sure why is the 'nr of rest pmus' needed
> >
>
> The 'nr of rest pmus' indicates the remaining pmus which are waiting for process.
>
> For example,
>
> <nr_caps>
> <caps string>
> "cpu_core"
> 1
> <nr_caps>
> <caps string>
> "cpu_atom"
> 0
>
> When we see '0' in data file processing, we know all the pmu have been processed yet.
>
> > the current format is:
> >
> > u32 nr_cpu_pmu_caps;
> > {
> > char name[];
> > char value[];
> > } [nr_cpu_pmu_caps]
> >
> >
> > I guess we could extend it to:
> >
> > u32 nr_cpu_pmu_caps;
> > {
> > char name[];
> > char value[];
> > } [nr_cpu_pmu_caps]
> > char pmu_name[]
> >
> > u32 nr_cpu_pmu_caps;
> > {
> > char name[];
> > char value[];
> > } [nr_cpu_pmu_caps]
> > char pmu_name[]
> >
> > ...
> >
> > and we could detect the old format by checking that there's no
> > pmu name.. but maybe I'm missing something, I did not check deeply,
> > please let me know
> >
>
> Actually we do the same thing, but I just add an extra 'nr of rest pmus'
> after the pmu_name. The purpose of 'nr of rest pmus' is when we see '0' at
> 'nr of rest pmus', we know that all pmus have been processed.
>
> Otherwise, we have to continue reading data file till we find something
> incorrect and then finally drop the last read data.
you have the size of the feature data right? I think we use
it in other cases to check if there are more data
>
> So is this solution acceptable?
>
> > also would be great to move the format change and storing hybrid
> > pmus in separate patches
> >
>
> Maybe we have to put the storing and processing into one patch.
>
> Say patch 1 contains the format change and storing hybrid pmus. And patch 2
> contains the processing for the new format. If the repo only contains the
> patch 1, I'm afraid that may introduce the compatible issue.
maybe you can have change of caps format in one patch
and storing/processing hybrid pmus in another?
jirka
next prev parent reply other threads:[~2021-05-06 13:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 7:46 [PATCH v1 1/2] perf header: Support HYBRID_TOPOLOGY feature Jin Yao
2021-04-30 7:46 ` [PATCH v1 2/2] perf header: Support hybrid CPU_PMU_CAPS Jin Yao
2021-05-04 15:07 ` Jiri Olsa
2021-05-06 4:59 ` Jin, Yao
2021-05-06 13:22 ` Jiri Olsa [this message]
2021-05-06 14:43 ` Jin, Yao
2021-05-10 13:11 ` Jiri Olsa
2021-05-11 1:15 ` Jin, Yao
2021-05-03 15:18 ` [PATCH v1 1/2] perf header: Support HYBRID_TOPOLOGY feature Arnaldo Carvalho de Melo
2021-05-04 2:03 ` Jin, Yao
2021-05-04 14:54 ` Jiri Olsa
2021-05-06 2:01 ` Jin, Yao
2021-05-04 14:56 ` Jiri Olsa
2021-05-04 19:28 ` Arnaldo Carvalho de Melo
2021-05-04 19:37 ` Jiri Olsa
2021-05-05 13:49 ` Arnaldo Carvalho de Melo
2021-05-05 20:28 ` Jiri Olsa
2021-05-06 2:22 ` Jin, Yao
2021-05-06 2:17 ` Jin, Yao
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=YJPtmyzTEe/IUID4@krava \
--to=jolsa@redhat.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
--cc=yao.jin@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.