From: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
To: khorenko@virtuozzo.com, alexander.ivanov@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 v2 0/7] dm-qcow2: per-qio fast path
Date: Tue, 10 Nov 2026 14:46:22 +0300 [thread overview]
Message-ID: <20261110114629.416695-1-andrey.zhadchenko@virtuozzo.com> (raw)
dm-qcow2 processes every request sequentially in a single kwork.
Unfortunately this introduces latency and cpu-bound limits. This
patchset adds a fast path: right after splitting, qios which need no
metadata changes are processed outside the main kwork, in parallel
with it and with each other. These are:
- reads and writes of fully allocated clusters;
- reads of unallocated clusters, which are zero-filled or forwarded
to the lower delta;
- partial discards, which only punch a hole in the image file.
Everything else (allocations, COW, compressed clusters, discards
changing metadata, backward merge) still goes to the main kwork.
Fast path qios are batched in per-cpu llists and processed by one
work per submitting CPU, to avoid queue_work() cost on every I/O. The
target also declares DM_TARGET_NOWAIT now, so io_uring submits I/O
inline instead of punting every request to io-wq.
Patch 1 fixes a race with md page insertion which already exists
between qcow2_llseek_hole() and the main kwork, and which the fast
path makes more likely. Patch 2 makes perform_rw_mapped() safe to run
in parallel with the main kwork md writeback.
v2:
- patch 2 waits for L2 writeback, so a fast path write is not acked
before its L2 entry is on disk
- batching goes before DM_TARGET_NOWAIT, and its worker no longer
loops unbounded
- measurements moved to the thread
- subject prefix changed to dm-qcow2
Details are in the patches.
https://virtuozzo.atlassian.net/browse/VSTOR-95494
Andrey Zhadchenko (7):
dm-qcow2: repeat md page lookup if it was inserted in parallel
dm-qcow2: wait for L2 writeback in perform_rw_mapped()
dm-qcow2: prepare process_one_qio() for fastpath
dm-qcow2: add per-qio work infrastructure
dm-qcow2: implement per-qio fast processing
dm-qcow2: process fast path qios in per-cpu batches on a workqueue
dm-qcow2: declare DM_TARGET_NOWAIT
drivers/md/dm-qcow2-map.c | 245 +++++++++++++++++++++++++++++------
drivers/md/dm-qcow2-target.c | 12 +-
drivers/md/dm-qcow2.h | 16 ++-
3 files changed, 229 insertions(+), 44 deletions(-)
--
2.43.5
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next reply other threads:[~2026-11-10 11:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 11:46 Andrey Zhadchenko [this message]
2026-11-10 11:46 ` [Devel] [PATCH hci-8.1 v2 1/7] dm-qcow2: repeat md page lookup if it was inserted in parallel Andrey Zhadchenko
2026-11-10 11:55 ` no-reply
2026-11-10 17:56 ` Konstantin Khorenko
2026-11-10 11:46 ` [Devel] [PATCH hci-8.1 v2 2/7] dm-qcow2: wait for L2 writeback in perform_rw_mapped() Andrey Zhadchenko
2026-11-10 11:56 ` no-reply
2026-11-10 17:56 ` Konstantin Khorenko
2026-11-10 11:46 ` [Devel] [PATCH hci-8.1 v2 3/7] dm-qcow2: prepare process_one_qio() for fastpath Andrey Zhadchenko
2026-11-10 11:59 ` no-reply
2026-11-10 13:50 ` Andrey Zhadchenko
2026-11-10 17:56 ` Konstantin Khorenko
2026-11-11 14:36 ` Alexander Ivanov
2026-11-10 11:46 ` [Devel] [PATCH hci-8.1 v2 4/7] dm-qcow2: add per-qio work infrastructure Andrey Zhadchenko
2026-11-10 12:02 ` no-reply
2026-11-11 15:34 ` Andrey Zhadchenko
2026-11-10 17:56 ` Konstantin Khorenko
2026-11-10 11:46 ` [Devel] [PATCH hci-8.1 v2 5/7] dm-qcow2: implement per-qio fast processing Andrey Zhadchenko
2026-11-10 12:08 ` no-reply
2026-11-10 17:56 ` Konstantin Khorenko
2026-11-10 11:46 ` [Devel] [PATCH hci-8.1 v2 6/7] dm-qcow2: process fast path qios in per-cpu batches on a workqueue Andrey Zhadchenko
2026-11-10 12:06 ` no-reply
2026-11-10 17:56 ` Konstantin Khorenko
2026-11-11 15:00 ` Alexander Ivanov
2026-11-10 11:46 ` [Devel] [PATCH hci-8.1 v2 7/7] dm-qcow2: declare DM_TARGET_NOWAIT Andrey Zhadchenko
2026-11-10 12:06 ` no-reply
2026-11-10 17:56 ` [Devel] [PATCH hci-8.1 v2 0/7] dm-qcow2: per-qio fast path Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261110114629.416695-1-andrey.zhadchenko@virtuozzo.com \
--to=andrey.zhadchenko@virtuozzo.com \
--cc=alexander.ivanov@virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox