* [PATCH sched_ext/for-7.2] tools/sched_ext: Remove unused nr_cpus in scx_cpu0
@ 2026-04-21 5:31 Cheng-Yang Chou
2026-04-21 6:09 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Cheng-Yang Chou @ 2026-04-21 5:31 UTC (permalink / raw)
To: sched-ext, Tejun Heo, David Vernet, Andrea Righi, Changwoo Min
Cc: Ching-Chun Huang, Chia-Ping Tsai, yphbchou0911
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>
---
tools/sched_ext/scx_cpu0.bpf.c | 2 --
tools/sched_ext/scx_cpu0.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/tools/sched_ext/scx_cpu0.bpf.c b/tools/sched_ext/scx_cpu0.bpf.c
index 0b1a7ce879b0..909d1be1bfe3 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 a6fba9978b9c..4966e3d4c724 100644
--- a/tools/sched_ext/scx_cpu0.c
+++ b/tools/sched_ext/scx_cpu0.c
@@ -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':
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH sched_ext/for-7.2] tools/sched_ext: Remove unused nr_cpus in scx_cpu0
2026-04-21 5:31 [PATCH sched_ext/for-7.2] tools/sched_ext: Remove unused nr_cpus in scx_cpu0 Cheng-Yang Chou
@ 2026-04-21 6:09 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2026-04-21 6:09 UTC (permalink / raw)
To: Cheng-Yang Chou
Cc: sched-ext, David Vernet, Andrea Righi, Changwoo Min,
Ching-Chun Huang, Chia-Ping Tsai
Hello,
On Tue, Apr 21, 2026 at 01:31:13PM +0800, Cheng-Yang Chou wrote:
> 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.
Applied to sched_ext/for-7.2.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-21 6:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-21 5:31 [PATCH sched_ext/for-7.2] tools/sched_ext: Remove unused nr_cpus in scx_cpu0 Cheng-Yang Chou
2026-04-21 6:09 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox