]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools/sched_ext: Remove unused nr_cpus in scx_cpu0
authorCheng-Yang Chou <yphbchou0911@gmail.com>
Tue, 21 Apr 2026 05:31:13 +0000 (13:31 +0800)
committerTejun Heo <tj@kernel.org>
Tue, 21 Apr 2026 06:05:11 +0000 (20:05 -1000)
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 <yphbchou0911@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/sched_ext/scx_cpu0.bpf.c
tools/sched_ext/scx_cpu0.c

index 0b1a7ce879b068e3aca56c458de01f5826381319..909d1be1bfe3cbd00c493b24fd79669e525a8728 100644 (file)
@@ -18,8 +18,6 @@
 
 char _license[] SEC("license") = "GPL";
 
-const volatile u32 nr_cpus = 32;       /* !0 for veristat, set during init */
-
 UEI_DEFINE(uei);
 
 /*
index a6fba9978b9cecc594c7e368d08cc5176111386c..4966e3d4c7249e37e55c4dde5b55436be8ce3f14 100644 (file)
@@ -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':