Skip to contentSkip to conversation

tools/sched_ext: Add missing -d option in scx_flatcg

PATCH Superseded Cheng-Yang Chou 2 participants 3 messages Apr 18 – Apr 19 Scheduler - sched_ext

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/sched_ext: Add missing -d option in scx_flatcg

Add missing -d option to help_fmt to reflect the capability.

---
 tools/sched_ext/scx_flatcg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/sched_ext/scx_flatcg.c +2 -1
index d865c381589b..fa27352f9a6d 100644
@@ -27,10 +27,11 @@ const char help_fmt[] =
 "\n"
 "See the top-level comment in .bpf.c for more details.\n"
 "\n"
-"Usage: %s [-s SLICE_US] [-i INTERVAL] [-f] [-v]\n"
+"Usage: %s [-s SLICE_US] [-i INTERVAL] [-d] [-f] [-v]\n"
 "\n"
 "  -s SLICE_US   Override slice duration\n"
 "  -i INTERVAL   Report interval\n"
+"  -d            Dump cgroup hierarchy on start\n"
 "  -f            Use FIFO scheduling instead of weighted vtime scheduling\n"
 "  -v            Print libbpf debug messages\n"
 "  -h            Display this help and exit\n";
Signature · 1 line
2.48.1
reviewer
#1 lore raw

Hello,

-d is dead code - it just sets dump_cgrps which is only echoed in the status-line printf, nothing actually dumps the cgroup hierarchy. The right thing to do is remove the whole thing - the 'd' in getopt(), case 'd':, the dump_cgrps variable and its printf - rather than document dead code as a feature.

Want to spin a removal patch?

Thanks.

Signature · 1 line
tejun
#2 lore raw

Hi Tejun,

Quoted 7 lines · Tejun Heo

-d is dead code - it just sets dump_cgrps which is only echoed in the status-line printf, nothing actually dumps the cgroup hierarchy. The right thing to do is remove the whole thing - the 'd' in getopt(), case 'd':, the dump_cgrps variable and its printf - rather than document dead code as a feature.

Want to spin a removal patch?

Yeah, for sure! Thanks for the explanation, will do!

Signature · 2 lines
Cheers,
Cheng-Yang