Re: [PATCH v3] perf bench sched pipe: Add -G/--cgroups option
From: Ingo Molnar
Date: Tue Oct 17 2023 - 07:40:16 EST
* Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> Em Mon, Oct 16, 2023 at 12:55:33PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Mon, Oct 16, 2023 at 12:51:52PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Now back at testing with with cgroups.
>
> > Humm, even without the -G I get:
>
> > [root@five ~]# perf stat -e context-switches,cgroup-switches perf bench sched pipe -l 10000
> > # Running 'sched/pipe' benchmark:
> > # Executed 10000 pipe operations between two processes
>
> > Total time: 0.082 [sec]
>
> > 8.246400 usecs/op
> > 121265 ops/sec
>
> > Performance counter stats for 'perf bench sched pipe -l 10000':
>
> > 20,002 context-switches
> > 20,002 cgroup-switches
>
> Same number, but then I forgot to add the 'taskset -c 0' part of the
> command line, if I have it:
Side note: it might make sense to add a sane cpumask/affinity setting
option to perf stat itself:
perf stat --cpumask
... or so?
We do have -C:
-C, --cpu <cpu> list of cpus to monitor in system-wide
... but that's limited to --all-cpus, right?
Perhaps we could extend --cpu to non-system-wide runs too?
Thanks,
Ingo