[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7cjoStnwi+UbruGKxYbmKnD0+TU4u5suacQFLt6sb5tf=g@mail.gmail.com>
Date: Fri, 20 Oct 2023 14:13:50 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH v4] perf bench sched pipe: Add -G/--cgroups option
On Fri, Oct 20, 2023 at 1:32 PM Arnaldo Carvalho de Melo
<acme@...nel.org> wrote:
>
> 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@...hat.com>
Thanks a lot Arnaldo!
Ingo, can I keep you Acked-by here? (forgot to add in v4, sorry!)
Thanks,
Namhyung
>
> [root@...e ~]# 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@...e ~]# 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@...e ~]# vim /tmp/bla
> [root@...e ~]#
> [root@...e ~]# mkdir /sys/fs/cgroup/BBB /sys/fs/cgroup/AAA
> [root@...e ~]# 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@...e ~]#
Powered by blists - more mailing lists