Re: [PATCH v2 4/4] sched_ext: charge BPF scheduler tasks to cpu.max bandwidth
From: bot+bpf-ci
Date: Wed Nov 11 2026 - 03:31:15 EST
> sched_ext: charge BPF scheduler tasks to cpu.max bandwidth
TL;DR: Nit only, in the selftest: join_path(), cgroup_id() and
controller_enabled() in cgroup_runtime.c duplicate helpers in
cgroup_nr_cpus.c; consider moving them into shared util.c/util.h.
> diff --git a/tools/testing/selftests/sched_ext/cgroup_runtime.c b/tools/testing/selftests/sched_ext/cgroup_runtime.c
> new file mode 100644
> --- /dev/null
> +++ b/tools/testing/selftests/sched_ext/cgroup_runtime.c
[ ... ]
> +static int join_path(char *dst, size_t dst_size, const char *parent, const char *name)
> +{
> + int ret;
> +
> + ret = snprintf(dst, dst_size, "%s/%s", parent, name);
> + if (ret < 0 || (size_t)ret >= dst_size)
> + return -ENAMETOOLONG;
> + return 0;
> +}
[ ... ]
this isn't a bug, but join_path(), cgroup_id() and controller_enabled() look
identical to the static helpers of the same names in cgroup_nr_cpus.c.
Could they move into the shared util.c/util.h so both cgroup tests use one
copy?
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/42982707042