On Sun, Nov 23, 2025 at 04:14:31PM +0000, Miod Vallat wrote:
> > All cores attached, i.e. octeon's hw_cpu_hatch() should've run
> > and bumped `ncpus' four times.
>
> Except that this only happens after cpu_boot_secondary_processors()
> completes, which is way later than softnet_percpu().
octeon sets ncpus late, but ncpusfound is set early. Other subsystems
also use that variable. My mistake using the wrong one.
root@ot8:.../~# ps axk | grep softnet
8091 ?? DK 0:10.83 (softnet2)
83269 ?? DK 0:11.41 (softnet3)
9620 ?? DK 0:20.40 (softnet4)
1191 ?? DK 0:00.00 (softnet5)
47517 ?? DK 0:07.52 (softnet6)
28614 ?? DK 0:14.31 (softnet7)
77775 ?? DK 0:10.76 (softnet1)
97587 ?? DK 0:10.74 (softnet0)
ok?
bluhm
Index: net/if.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/net/if.c,v
diff -u -p -r1.760 if.c
--- net/if.c 11 Dec 2025 07:09:20 -0000 1.760
+++ net/if.c 30 Dec 2025 17:06:37 -0000
@@ -3799,7 +3799,7 @@ softnet_count(void)
static unsigned int nsoftnets;
if (nsoftnets == 0)
- nsoftnets = min(NET_TASKQ, ncpus);
+ nsoftnets = min(NET_TASKQ, ncpusfound);
return (nsoftnets);
}