lkml.org 
[lkml]   [2023]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] perf bench sched pipe: Add -G/--cgroups option
Em Mon, Oct 16, 2023 at 11:35:35AM +0200, Ingo Molnar escreveu:
>
>
> * 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>

I'm not getting that:

[root@five ~]# perf bench sched pipe -l 10000 -G AAA,BBB
# Running 'sched/pipe' benchmark:
no access to cgroup /sys/fs/cgroup/AAA
cannot open sender cgroup: AAA
Usage: perf bench sched pipe <options>

-G, --cgroups <SEND,RECV>
Put sender and receivers in given cgroups
[root@five ~]#

Its better now as it bails out, but it is not emitting any message that
helps with running the test, well, there is that /sys/fs/cgroup/AAA
path, lemme try doing a mkdir:

[root@five ~]# perf bench sched pipe -l 10000 -G AAA,BBB
# Running 'sched/pipe' benchmark:
no access to cgroup /sys/fs/cgroup/BBB
cannot open receiver cgroup: BBB
Usage: perf bench sched pipe <options>

-G, --cgroups <SEND,RECV>
Put sender and receivers in given cgroups
[root@five ~]#

[root@five ~]# perf bench sched pipe -l 10000 -G AAA,BBB
# Running 'sched/pipe' benchmark:
[root@five ~]#

It seems to be bailing out but doesn't run the test nor emits any
warning.

I'm using v3. I'll try to debug it a bit.

- Arnaldo

\
 
 \ /
  Last update: 2023-10-16 17:39    [W:3.102 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site