Download raw body.
limit softnet threads to number of cpu
> From: "Theo de Raadt" <deraadt@openbsd.org> > Date: Mon, 08 Sep 2025 13:15:49 -0600 > > Mike Larkin <mlarkin@nested.page> wrote: > > > I had a long reply typed up about the fact that we probably know the > > number of CPUs by the time the first network driver attaches but then > > realized that doesn't then solve the question of when the softnet tasks > > would be created. It would have to be shimmed in somewhere after cpuX > > but before any network driver, and that would be less clean than your > > approach below. > > I think we had an architecture where the other cpu's attached very, > very late. > > Was it sgi? Not sure about sgi, but yes it used to be all over the place. We moved to an "attach CPUs first/early" model in part because we wanted to distribute the interrupts for multiqueue NICs over different CPUs. That is somewhat related to the issue being discussed here. At least my understanding is that NIC queues are tied to softnet threads. I am wondering if creating the softnet threads "on demand" when the network drivers attach would make sense. But I also think that at some point we need a way to rebalance the interrupts over the available CPUs. Anyway, while I'm not entirely happy with the diff, I don't think that should block this it.
limit softnet threads to number of cpu