> queue_work() is pretty costly under high load. It takes pool->lock; > unbound pools do not track running workers (WORKER_UNBOUND is part > of WORKER_NOT_RUNNING), so an idle kworker is woken (idle exit + IPI + > context switch) even if a running worker would pick the work up right > away. Every qio has its own work, so this is paid for every I/O. With > several submitters this ends up in several context switches per I/O > and in contention on pool->lock. > > Batch requests with percpu llists. Additionally track if the worker > is busy and queue_work() only if it is not. The worker processes one > batch per run and requeues itself if more qios came meanwhile, so > flush_workqueue(), e.g. on backward merge completion with I/O still > running, does not wait for a worker which is refilled all the time. > > The fast path is now serial per submitting CPU: qios queued from one > [ ... ] > submission to the same image sleeps on it. > > https://virtuozzo.atlassian.net/browse/VSTOR-95494 > Feature: dm-qcow2: block device over QCOW2 files driver > Signed-off-by: Andrey Zhadchenko <[email protected]>
Sashiko has reviewed this patch and found no issues. -- Sashiko AI review ยท https://sashiko.vzint.dev/#/patchset/[email protected]?part=7 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
