Re: [PATCH RFC v1] ksmbd: add use_unbound_wq module parameter for the ksmbd-io workqueue
From: Namjae Jeon
Date: Tue Nov 17 2026 - 09:27:03 EST
On Tue, Nov 17, 2026 at 5:51 PM Stefan Chulski
<stefan.chulski@xxxxxxxxxxxx> wrote:
>
> 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
Okay.
https://lore.kernel.org/linux-cifs/20261022092514.2590010-1-huiwen.he@xxxxxxxxx/
Huiwen’s RFC also provides a write_wq module parameter, disabled by
default, so both approaches keep per-CPU request processing as the
default. The main difference is that Huiwen’s patch routes eligible
single-channel WRITEs to a separate unbound queue, while your patch
switches the entire ksmbd-io queue to unbound.
So, Could you test Huiwen’s patch series with write_wq=1 on your
platform and compare the results with your patch ?
Thanks.