Skip to content

qcow2: relax subclusters allocation dependencies

Vladimir Sementsov-Ogievskiy qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 4 repliesIn review
  2. v13 patches 9 repliesSuperseded

Changes in v2 from the cover letter

01: improve documentation
02: add Hanna's and Eric's r-bs, add tiny grammar fix 03: fix test by filtering instead of reducing number of writes

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3simplebench: add img_bench_templater.pyscripts/simplebench/img_bench_templater.py scripts/simplebench/table_templater.py+157 -01 reply
2/3qcow2: refactor handle_dependencies() loop bodyblock/qcow2-cluster.c+28 -210 replies
3/3qcow2: handle_dependencies(): relax conflict detectionblock/qcow2-cluster.c tests/qemu-iotests/271 tests/qemu-iotests/271.out+17 -32 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchEric BlakeHanna Reitz
1/3R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] qcow2: relax subclusters allocation dependencies

Hi all!

v2:
01: improve documentation
02: add Hanna's and Eric's r-bs, add tiny grammar fix 03: fix test by filtering instead of reducing number of writes

Parallel small writes to unallocated cluster works bad when subclusters enabled.

Look, without subclusters, one of write requests will allocate the whole cluster, and all other writes to this cluster will be independent of each other, they depend only on the first one that does allocation.

With subclusters, each write to unallocated subcluster will block the whole cluster for parallel writing.

So, assume we write 8 consecutive 4k chunks in parallel:

Without subclusters, one of the chunks will block all the cluster and write L2 entry. The remaining 7 chunks are written in parallel.

With subclusters, each of the chunks will allocate new subcluster and block the whole cluster. All the chunks are dependent on each other and queue depth becomes 1. That's not good.

Let's improve the situation.

Vladimir Sementsov-Ogievskiy (3):
simplebench: add img_bench_templater.py
qcow2: refactor handle_dependencies() loop body
qcow2: handle_dependencies(): relax conflict detection

 block/qcow2-cluster.c                      | 60 +++++++++-----
 scripts/simplebench/img_bench_templater.py | 95 ++++++++++++++++++++++
 scripts/simplebench/table_templater.py     | 62 ++++++++++++++
 tests/qemu-iotests/271                     |  5 +-
 tests/qemu-iotests/271.out                 |  4 +-
 5 files changed, 202 insertions(+), 24 deletions(-)
 create mode 100755 scripts/simplebench/img_bench_templater.py
 create mode 100644 scripts/simplebench/table_templater.py
Signature · 1 line
2.29.2