From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v4] perf bench sched pipe: Add -G/--cgroups option
Date: Fri, 20 Oct 2023 17:32:07 -0300 [thread overview]
Message-ID: <ZTLjx3A8LBQMYWHJ@kernel.org> (raw)
In-Reply-To: <20231017202342.1353124-1-namhyung@kernel.org>
Em Tue, Oct 17, 2023 at 01:23:42PM -0700, Namhyung Kim escreveu:
> The -G/--cgroups option is to put sender and receiver in different
> cgroups in order to measure cgroup context switch overheads.
<SNIP>
> > taskset -c 0 perf bench sched pipe -l 10000 -G AAA,BBB > /dev/null
> Performance counter stats for 'taskset -c 0 perf bench sched pipe -l 10000 -G AAA,BBB':
>
> 20,001 context-switches
> 20,001 cgroup-switches
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[root@five ~]# perf stat -e context-switches,cgroup-switches taskset -c 0 perf bench sched pipe -l 10000
# Running 'sched/pipe' benchmark:
# Executed 10000 pipe operations between two processes
Total time: 0.063 [sec]
6.367500 usecs/op
157047 ops/sec
Performance counter stats for 'taskset -c 0 perf bench sched pipe -l 10000':
20,004 context-switches
4 cgroup-switches
0.084191842 seconds time elapsed
0.008332000 seconds user
0.067193000 seconds sys
[root@five ~]# perf stat -e context-switches,cgroup-switches taskset -c 0 perf bench sched pipe -l 10000 -G AAA,BBB
# Running 'sched/pipe' benchmark:
no access to cgroup /sys/fs/cgroup/BBB
Failed to open cgroup file in BBB
Hint: create the cgroup first, like 'mkdir /sys/fs/cgroup/BBB'
no access to cgroup /sys/fs/cgroup/AAA
Failed to open cgroup file in AAA
Hint: create the cgroup first, like 'mkdir /sys/fs/cgroup/AAA'
Performance counter stats for 'taskset -c 0 perf bench sched pipe -l 10000 -G AAA,BBB':
2 context-switches
1 cgroup-switches
0.010356533 seconds time elapsed
0.003209000 seconds user
0.007122000 seconds sys
[root@five ~]# vim /tmp/bla
[root@five ~]#
[root@five ~]# mkdir /sys/fs/cgroup/BBB /sys/fs/cgroup/AAA
[root@five ~]# perf stat -e context-switches,cgroup-switches taskset -c 0 perf bench sched pipe -l 10000 -G AAA,BBB
# Running 'sched/pipe' benchmark:
# Executed 10000 pipe operations between two processes
Total time: 0.079 [sec]
7.987800 usecs/op
125190 ops/sec
Performance counter stats for 'taskset -c 0 perf bench sched pipe -l 10000 -G AAA,BBB':
20,008 context-switches
20,007 cgroup-switches
0.089361029 seconds time elapsed
0.009004000 seconds user
0.065376000 seconds sys
[root@five ~]#
next prev parent reply other threads:[~2023-10-20 20:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 20:23 [PATCH v4] perf bench sched pipe: Add -G/--cgroups option Namhyung Kim
2023-10-20 20:32 ` Arnaldo Carvalho de Melo [this message]
2023-10-20 21:13 ` Namhyung Kim
2023-10-26 17:11 ` 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=ZTLjx3A8LBQMYWHJ@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--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 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.