From: Davidlohr Bueso <dave@stgolabs.net>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: James Yang <james.yang@arm.com>,
Kim Phillips <kim.phillips@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Darren Hart <dvhart@infradead.org>,
Colin Ian King <colin.king@canonical.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] perf bench futex: benchmark only online CPUs
Date: Fri, 24 Nov 2017 07:32:49 -0800 [thread overview]
Message-ID: <20171124153249.ga4gdvsxl4t43uzt@linux-n805> (raw)
In-Reply-To: <20171123151100.GE8789@kernel.org>
On Thu, 23 Nov 2017, Arnaldo Carvalho de Melo wrote:
>Em Thu, Nov 23, 2017 at 12:09:48PM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Wed, Nov 22, 2017 at 06:25:28PM -0600, Kim Phillips escreveu:
>> > From: James Yang <james.yang@arm.com>
>> >
>> > The "perf bench futex" benchmarks have a problem when not all CPUs in
>> > the system are online: perf assumes the CPUs that are online are
>> > contiguously numbered and assigns processor affinity to the threads by
>> > modulo striping. When the online CPUs are not contiguously numbered,
>> > perf errors out with:
Good catch. Non contiguously numbered cpus was certainly not something I had
considered.
>> >
>> > $ echo 0 | sudo tee /sys/devices/system/cpu/cpu3/online
>> > 0
>> > $ ./oldperf bench futex all
>> > perf: pthread_create: Operation not permitted
>> > Run summary [PID 14934]: 7 threads, each operating on 1024 [private] futexes for 10 secs.
>> >
>> > $
>> >
>> > This patch makes perf not assume all CPUs configured are online, and
>> > adds a mapping table to stripe affinity across the CPUs that are
>> > online.
>>
>> So, have you looked at tools/perf/util/cpumap.c? I think you can use:
>>
>> int i;
>> struct cpu_map *cpus = cpu_map__new(NULL);
>>
>> for (i = 0; i < cpus->nr; ++i) {
>> int cpu = cpus->map[i];
>> ...
>> }
>>
>> No?
Ah, I was just thinking there should be something like this in perf already :)
>
>But then, this can be done later, as probably will result in more
>changes, I'm continuing to review the other patches.
Unsure if you're implying otherwise, but I would strongly prefer a v2 was sent
to use the perf's cpumap.c.
Thanks,
Davidlohr
next prev parent reply other threads:[~2017-11-24 15:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 0:25 Kim Phillips
2017-11-23 15:09 ` Arnaldo Carvalho de Melo
2017-11-23 15:11 ` Arnaldo Carvalho de Melo
2017-11-24 15:32 ` Davidlohr Bueso [this message]
2017-11-24 19:08 ` Arnaldo Carvalho de Melo
2017-11-24 21:30 ` James Yang
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=20171124153249.ga4gdvsxl4t43uzt@linux-n805 \
--to=dave@stgolabs.net \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=colin.king@canonical.com \
--cc=dvhart@infradead.org \
--cc=james.yang@arm.com \
--cc=jolsa@redhat.com \
--cc=kim.phillips@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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®