From: Jiri Olsa <jolsa@redhat.com>
To: James Clark <james.clark@arm.com>
Cc: linux-perf-users@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Namhyung Kim <namhyung@kernel.org>,
Tommi Rantala <tommi.t.rantala@nokia.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Andi Kleen <ak@linux.intel.com>,
Jin Yao <yao.jin@linux.intel.com>,
Kajol Jain <kjain@linux.ibm.com>,
Thomas Richter <tmricht@linux.ibm.com>,
Kan Liang <kan.liang@linux.intel.com>,
Alexey Budankov <alexey.budankov@linux.intel.com>
Subject: Re: [PATCH V2 3/3] perf tools: fix perf stat with large socket IDs
Date: Thu, 12 Nov 2020 22:28:19 +0100 [thread overview]
Message-ID: <20201112212819.GB753418@krava> (raw)
In-Reply-To: <ec3e153b-f5b9-dc70-a012-d180d1f32932@arm.com>
On Thu, Nov 12, 2020 at 09:42:42PM +0200, James Clark wrote:
>
>
> On 08/11/2020 14:44, Jiri Olsa wrote:
> > On Wed, Oct 28, 2020 at 09:43:11AM +0000, James Clark wrote:
> >
> > SNIP
> >
> >> - * Encode socket in bit range 31:24
> >> - * encode die id in bit range 23:16
> >> * core_id is relative to socket and die,
> >> * we need a global id. So we combine
> >> * socket + die id + core id
> >> */
> >> - if (WARN_ONCE(env->cpu[cpu].socket_id >> 8, "The socket id number is too big.\n"))
> >> - return cpu_map__empty_aggr_cpu_id();
> >> -
> >> - if (WARN_ONCE(env->cpu[cpu].die_id >> 8, "The die id number is too big.\n"))
> >> - return cpu_map__empty_aggr_cpu_id();
> >> -
> >> - if (WARN_ONCE(env->cpu[cpu].core_id >> 16, "The core id number is too big.\n"))
> >> - return cpu_map__empty_aggr_cpu_id();
> >> -
> >> - core.id = (env->cpu[cpu].socket_id << 24) |
> >> - (env->cpu[cpu].die_id << 16) |
> >> - (env->cpu[cpu].core_id & 0xffff);
> >> + core.socket_id = env->cpu[cpu].socket_id;
> >> + core.die_id = env->cpu[cpu].die_id;
> >> + core.core_id = env->cpu[cpu].core_id;
> >
> > all 3 functions above look like they could be united just
> > to single one, because they are no longer steping on ech
> > other data
> >
> > perhaps best as separate patch, so the change is clean
> >
> > there are also the 'system retrieval counter' functions,
> > where it's possible better to keep it separated from
> > performance reasons, but here it's just value assigment
>
> Hi Jiri,
>
> I have a new patchset ready without this change, and I started working on this, but I came
> across some issues:
>
> For example if all of the members are filled in regardless of the aggregation type,
> then the comparison function that actually decides whether cores should be aggregated or
> not will need to be modified to accept the current aggregation mode.
ah, because we compare all the values regardless and normaly there'd be -1
>
> This would be possible, but would have a knock on effect when the values are read
> from the system if the code is to be shared.
>
> Also there is a second issue where some of the current functions have different failure
> conditions. For example if socket can't be read, then that mode will fail, but other
> aggregation modes will still work. If we make the change to unify all the functions then
> that could get a bit more complicated.
>
> I just wanted to get your opinion whether to submit the broken up set without this extra
> change or carry on trying to work out a solution?
ok forget it then, seems like possible follow up changes if it's even worthy
thanks for checking on that
jirka
prev parent reply other threads:[~2020-11-12 21:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201004203545.GB217601@krava>
[not found] ` <20201028094311.8563-1-james.clark@arm.com>
[not found] ` <20201028094311.8563-3-james.clark@arm.com>
2020-11-12 15:18 ` [PATCH V2 2/3] perf tools: Replace aggregation ID with a struct John Garry
2020-11-17 15:05 ` James Clark
2020-11-17 15:48 ` James Clark
2020-11-17 15:53 ` James Clark
[not found] ` <20201028094311.8563-4-james.clark@arm.com>
[not found] ` <20201108124412.GA196289@krava>
2020-11-12 19:42 ` [PATCH V2 3/3] perf tools: fix perf stat with large socket IDs James Clark
2020-11-12 21:28 ` Jiri Olsa [this message]
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=20201112212819.GB753418@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexey.budankov@linux.intel.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=james.clark@arm.com \
--cc=kan.liang@linux.intel.com \
--cc=kjain@linux.ibm.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tmricht@linux.ibm.com \
--cc=tommi.t.rantala@nokia.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 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).