Run ktls_init() when the first KTLS session is created rather than
unconditionally during boot. This avoids creating unused threads and
resources on systems which do not use KTLS.
Sponsored by: Chelsio Communications
Differential D32487
ktls: Defer creation of threads and zones until first use. jhb on Oct 13 2021, 7:43 PM. Authored by Tags None Referenced Files
Subscribers
Details Run ktls_init() when the first KTLS session is created rather than Sponsored by: Chelsio Communications
Diff Detail
Event Timeline
Comment Actions I'm not a fan of this added complexity, but it looks like it was done in a very careful way. I really appreciate it being done when creating the session, rather than upon enqueue. Comment Actions I definitely tried to minimize the runtime overhead, so create session is definitely the better place than something per-op. It's also only feasible to handle failure in the create session context. FWIW, when I boot a RISC-V GENERIC kernel in QEMU KTLS is one of the few "unused" kprocs that stands out along with the "soaiod" kprocs (which I also just fixed to be created on demand instead). |