mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
79a3371bdf
The -G/--cgroups option is to put sender and receiver in different cgroups in order to measure cgroup context switch overheads. Users need to make sure the cgroups exist and accessible. The following example should the effect of this change. Please don't forget taskset before the perf bench to measure cgroup switches properly. Otherwise each task would run on a different CPU and generate cgroup switches regardless of this change. # perf stat -e context-switches,cgroup-switches \ > taskset -c 0 perf bench sched pipe -l 10000 > /dev/null Performance counter stats for 'taskset -c 0 perf bench sched pipe -l 10000': 20,001 context-switches 2 cgroup-switches 0.053449651 seconds time elapsed 0.011286000 seconds user 0.041869000 seconds sys # perf stat -e context-switches,cgroup-switches \ > 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 0.052768627 seconds time elapsed 0.006284000 seconds user 0.046266000 seconds sys Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Link: https://lore.kernel.org/r/20231017202342.1353124-1-namhyung@kernel.org |
||
---|---|---|
.. | ||
bench.h | ||
breakpoint.c | ||
Build | ||
epoll-ctl.c | ||
epoll-wait.c | ||
evlist-open-close.c | ||
find-bit-bench.c | ||
futex-hash.c | ||
futex-lock-pi.c | ||
futex-requeue.c | ||
futex-wake-parallel.c | ||
futex-wake.c | ||
futex.h | ||
inject-buildid.c | ||
kallsyms-parse.c | ||
mem-functions.c | ||
mem-memcpy-arch.h | ||
mem-memcpy-x86-64-asm-def.h | ||
mem-memcpy-x86-64-asm.S | ||
mem-memset-arch.h | ||
mem-memset-x86-64-asm-def.h | ||
mem-memset-x86-64-asm.S | ||
numa.c | ||
pmu-scan.c | ||
sched-messaging.c | ||
sched-pipe.c | ||
sched-seccomp-notify.c | ||
synthesize.c | ||
syscall.c | ||
uprobe.c |