Re: [PATCH RFC v1] ksmbd: add use_unbound_wq module parameter for the ksmbd-io workqueue

From: Stefan Chulski

Date: Tue Nov 17 2026 - 03:51:51 EST


On Tue, Nov 17, 2026 at 3:34 AM Namjae Jeon <linkinjeon@xxxxxxxxxx> wrote:
>
> On Mon, Nov 16, 2026 at 9:52 PM Stefan Chulski
> <stefan.chulski@xxxxxxxxxxxx> wrote:
> >
> > On Mon, Nov 16, 2026 at 2:10 PM Namjae Jeon <linkinjeon@xxxxxxxxxx> wrote:
> >
> > While both address the underlying scheduling limitations of per-CPU
> > workqueues for ksmbd, my patch introduces the `use_unbound_wq` module
> > parameter rather than changing the behavior unconditionally. Because
> > the optimal behavior (cache locality vs. load balancing) heavily
> > depends on the specific workload and platform, this approach keeps the
> > existing per-CPU behavior as the default while allowing platforms to
> > easily opt-in to the unbound workqueue when it yields better
> > performance.
> Could you provide the benchmark setup and actual results? If
> WQ_UNBOUND generally performs better across representative workloads,
> We could make it the default and provide a module parameter to opt
> into WQ_PERCPU instead.

These are the results from our embedded systems featuring dual-core ARM CPUs.
The benchmark setup is fairly simple: writing to a USB disk over the
network. Because the network traffic is a single 5-tuple TCP stream,
it is pinned to one of the CPUs (depending on the 5-tuple hash).

We tested this on two different platforms and saw the following
throughput improvements:
Platform 1: Improved from 178 MB/s to 210 MB/s
Platform 2: Improved from 215 MB/s to 263 MB/s

Regards,
Stefan