* [PATCH v2 sched_ext/for-7.1-fixes] tools/sched_ext: Remove dead -d option in scx_flatcg
@ 2026-04-19 16:36 Cheng-Yang Chou
2026-04-19 17:53 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Cheng-Yang Chou @ 2026-04-19 16:36 UTC (permalink / raw)
To: sched-ext, Tejun Heo, David Vernet, Andrea Righi, Changwoo Min
Cc: Ching-Chun Huang, Chia-Ping Tsai, yphbchou0911
The -d option was non-functional, only toggling a variable that was
echoed in the status line but never used to dump the cgroup hierarchy.
Remove the option to avoid documenting dead code as a feature.
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
---
Changes in v2:
- Remove dead -d option, since this is non-functional (Tejun Heo)
- Link to v1:
https://lore.kernel.org/r/20260418092247.1541377-1-yphbchou0911@gmail.com/
tools/sched_ext/scx_flatcg.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/tools/sched_ext/scx_flatcg.c b/tools/sched_ext/scx_flatcg.c
index d865c381589b..de2bef86d64d 100644
--- a/tools/sched_ext/scx_flatcg.c
+++ b/tools/sched_ext/scx_flatcg.c
@@ -130,7 +130,6 @@ int main(int argc, char **argv)
struct scx_flatcg *skel;
struct bpf_link *link;
struct timespec intv_ts = { .tv_sec = 2, .tv_nsec = 0 };
- bool dump_cgrps = false;
__u64 last_cpu_sum = 0, last_cpu_idle = 0;
__u64 last_stats[FCG_NR_STATS] = {};
unsigned long seq = 0;
@@ -148,7 +147,7 @@ int main(int argc, char **argv)
assert(skel->rodata->nr_cpus > 0);
skel->rodata->cgrp_slice_ns = __COMPAT_ENUM_OR_ZERO("scx_public_consts", "SCX_SLICE_DFL");
- while ((opt = getopt(argc, argv, "s:i:dfvh")) != -1) {
+ while ((opt = getopt(argc, argv, "s:i:fvh")) != -1) {
double v;
switch (opt) {
@@ -161,9 +160,6 @@ int main(int argc, char **argv)
intv_ts.tv_sec = v;
intv_ts.tv_nsec = (v - (float)intv_ts.tv_sec) * 1000000000;
break;
- case 'd':
- dump_cgrps = true;
- break;
case 'f':
skel->rodata->fifo_sched = true;
break;
@@ -177,10 +173,10 @@ int main(int argc, char **argv)
}
}
- printf("slice=%.1lfms intv=%.1lfs dump_cgrps=%d",
+ printf("slice=%.1lfms intv=%.1lfs",
(double)skel->rodata->cgrp_slice_ns / 1000000.0,
- (double)intv_ts.tv_sec + (double)intv_ts.tv_nsec / 1000000000.0,
- dump_cgrps);
+ (double)intv_ts.tv_sec + (double)intv_ts.tv_nsec / 1000000000.0);
+
SCX_OPS_LOAD(skel, flatcg_ops, scx_flatcg, uei);
link = SCX_OPS_ATTACH(skel, flatcg_ops, scx_flatcg);
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-19 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-19 16:36 [PATCH v2 sched_ext/for-7.1-fixes] tools/sched_ext: Remove dead -d option in scx_flatcg Cheng-Yang Chou
2026-04-19 17:53 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox