[PATCH 1/4] nvme-tcp: per-controller I/O workqueues
Sagi Grimberg
sagi at grimberg.me
Wed Jul 3 12:14:14 PDT 2024
>> I'm just not used to seeing drivers create non-global workqueues. I've seen
>> some filesystems have workqueues per-super, but
>> it's not a common pattern around the kernel.
>>
>> Tejun,
>> Is this a pattern that we should pursue? Do multiple symmetric workqueues
>> really work better (faster, with less overhead) than
>> a single global workqueues?
> Yeah, there's nothing wrong with creating multiple if for the right reasons.
> Here are some reasons I can think of:
>
> - Not wanting to share concurrency limit so that one one device can't
> interfere with another. Not sharing rescuer may also have *some* benefits
> although I doubt it'd be all that noticeable.
>
> - To get separate flush domains. e.g. If you want to be able to do
> flush_workqueue() on the work items that service one device without
> getting affected by work items from other devices.
>
> - To get different per-device workqueue attribtes - e.g. maybe you wanna
> confine workers serving a specific device to a subset of CPUs or give them
> higher priority.
None of these reasons are the claimed reason to use separate workqueues in
this patch. The claim is that it is more efficient, i.e. has less overhead.
The commit msg is the following:
"Implement per-controller I/O workqueues to reduce workqueue contention
during I/O."
> Note that separating workqueues does not necessarily change how things are
> executed. e.g. You don't get your own kworkers.
Yes, that is well understood.
More information about the Linux-nvme
mailing list