On Tue, Dec 30, 2025 at 06:21:51PM +0000, Miod Vallat wrote:
> > octeon sets ncpus late, but ncpusfound is set early.  Other subsystems
> > also use that variable.  My mistake using the wrong one.
> 
> I'm a bit worried about using ncpusfound here, because if the hw.smt
> sysctl is set to zero, ncpus ends up being only half the value of
> ncpusfound...

The only problem would be that we spawn more softnet threads than
needed.  This is already the case on amd64, even without my diff.
And if someone sets hw.smt=1 dring runtime we have enough threads.

amd64 without diff:

hw.machine=amd64
hw.model=Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz
hw.ncpu=12
hw.ncpufound=12
hw.ncpuonline=6
hw.smt=0

root@ot29:.../~# ps kax | grep softnet
35677 ??  DK       1:24.24 (softnet3)
65402 ??  DK       0:31.08 (softnet5)
30386 ??  DK       0:24.73 (softnet6)
98700 ??  DK       0:33.41 (softnet7)
49742 ??  DK       0:31.32 (softnet4)
 1993 ??  DK       1:39.64 (softnet0)
16881 ??  DK       0:12.58 (softnet1)
76787 ??  DK       0:26.20 (softnet2)

Reply via email to