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

Vladimir Sementsov-Ogievskiy posted 3 patches 2 years, 9 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210724133846.64614-1-vsementsov@virtuozzo.com
Maintainers: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>, Hanna Reitz <hreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
There is a newer version of this series
block/qcow2-cluster.c                      | 60 +++++++++------
scripts/simplebench/img_bench_templater.py | 85 ++++++++++++++++++++++
scripts/simplebench/table_templater.py     | 62 ++++++++++++++++
tests/qemu-iotests/271                     |  4 +-
tests/qemu-iotests/271.out                 |  2 -
5 files changed, 187 insertions(+), 26 deletions(-)
create mode 100755 scripts/simplebench/img_bench_templater.py
create mode 100644 scripts/simplebench/table_templater.py
[PATCH 0/3] qcow2: relax subclusters allocation dependencies
Posted by Vladimir Sementsov-Ogievskiy 2 years, 9 months ago
Hi all!

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 | 85 ++++++++++++++++++++++
 scripts/simplebench/table_templater.py     | 62 ++++++++++++++++
 tests/qemu-iotests/271                     |  4 +-
 tests/qemu-iotests/271.out                 |  2 -
 5 files changed, 187 insertions(+), 26 deletions(-)
 create mode 100755 scripts/simplebench/img_bench_templater.py
 create mode 100644 scripts/simplebench/table_templater.py

-- 
2.29.2