Messages in this thread | | | Date | Mon, 16 Oct 2023 11:35:35 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH v3] perf bench sched pipe: Add -G/--cgroups option |
| |
* Namhyung Kim <namhyung@kernel.org> wrote:
> + /* try cgroup v2 interface first */ > + if (threaded) > + fd = openat(cgrp->fd, "cgroup.threads", O_WRONLY); > + else > + fd = openat(cgrp->fd, "cgroup.procs", O_WRONLY); > + > + /* try cgroup v1 if failed */ > + if (fd < 0) > + fd = openat(cgrp->fd, "tasks", O_WRONLY); > + > + if (fd < 0) { > + char mnt[PATH_MAX]; > + > + printf("Failed to open cgroup file in %s\n", cgrp->name); > + > + if (cgroupfs_find_mountpoint(mnt, sizeof(mnt), "perf_event") == 0) > + printf(" Hint: create the cgroup first, like 'mkdir %s/%s'\n", > + mnt, cgrp->name);
Ok, this works too I suppose.
Acked-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Ingo
| |