Re: [PATCH] perf bench sched pipe: Add -G/--cgroups option

From: Namhyung Kim
Date: Fri Oct 13 2023 - 19:22:30 EST


On Fri, Oct 13, 2023 at 4:10 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> diff --git a/tools/perf/bench/sched-pipe.c b/tools/perf/bench/sched-pipe.c
> index 1103fd658d5d..25236f339b90 100644
> --- a/tools/perf/bench/sched-pipe.c
> +++ b/tools/perf/bench/sched-pipe.c
> @@ -118,9 +118,9 @@ static void enter_cgroup(struct cgroup *cgrp)
>
> /* try cgroup v2 interface first */
> if (threaded)
> - fd = openat(cgrp->fd, "cgroup.procs", O_WRONLY);
> - else
> fd = openat(cgrp->fd, "cgroup.threads", O_WRONLY);
> + else
> + fd = openat(cgrp->fd, "cgroup.progs", O_WRONLY);
>
> /* try cgroup v1 if failed */
> if (fd < 0)

Oh, actually it should be 'procs' instead of 'progs'.

Thanks,
Namhyung