From: Cheng-Yang Chou Date: Tue, 21 Apr 2026 05:31:13 +0000 (+0800) Subject: tools/sched_ext: Remove unused nr_cpus in scx_cpu0 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=12ff49d4e1d9df09320b19a0c33477f9cc737baf;p=thirdparty%2Flinux.git 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 Signed-off-by: Tejun Heo --- diff --git a/tools/sched_ext/scx_cpu0.bpf.c b/tools/sched_ext/scx_cpu0.bpf.c index 0b1a7ce879b06..909d1be1bfe3c 100644 --- a/tools/sched_ext/scx_cpu0.bpf.c +++ b/tools/sched_ext/scx_cpu0.bpf.c @@ -18,8 +18,6 @@ char _license[] SEC("license") = "GPL"; -const volatile u32 nr_cpus = 32; /* !0 for veristat, set during init */ - UEI_DEFINE(uei); /* diff --git a/tools/sched_ext/scx_cpu0.c b/tools/sched_ext/scx_cpu0.c index a6fba9978b9ce..4966e3d4c7249 100644 --- a/tools/sched_ext/scx_cpu0.c +++ b/tools/sched_ext/scx_cpu0.c @@ -72,8 +72,6 @@ restart: 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':