tools/sched_ext: Remove unused nr_cpus in scx_cpu0
PATCH 1/1 tools/sched_ext: Remove unused nr_cpus in scx_cpu0
The nr_cpus variable is defined in scx_cpu0.bpf.c but never used in the BPF logic. Remove both in BPF and userspace side.
Signed-off-by Cheng-Yang Chou <[email protected]>
--- tools/sched_ext/scx_cpu0.bpf.c | 2 -- tools/sched_ext/scx_cpu0.c | 2 -- 2 files changed, 4 deletions(-)
tools/sched_ext/scx_cpu0.bpf.c +0 -2
@@ -18,8 +18,6 @@ char _license[] SEC("license") = "GPL"; -const volatile u32 nr_cpus =32 ;/* !0 for veristat, set during init */ -UEI_DEFINE (uei);/*
tools/sched_ext/scx_cpu0.c +0 -2
@@ -72,8 +72,6 @@ int main(int argc, char **argv) optind =1 ; skel =SCX_OPS_OPEN (cpu0_ops, scx_cpu0); - skel->rodata->nr_cpus =libbpf_num_possible_cpus (); -while ((opt =getopt (argc, argv,"vh" )) !=-1 ) {switch (opt) {case 'v' :
Signature · 1 line
2.48.1
Hello,
Quoted 2 lines · Cheng-Yang Chou
The
nr_cpusvariable is defined inscx_cpu0.bpf.cbut never used in the BPF logic. Remove both in BPF and userspace side.
Applied to sched_ext/for-7.2.
Thanks.
--
tejun