From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Emanuele Giuseppe Esposito <eesposit@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>
Subject: [PATCH v3 0/5] block-copy: make helper APIs thread safe
Date: Mon, 14 Jun 2021 10:11:25 +0200 [thread overview]
Message-ID: <20210614081130.22134-1-eesposit@redhat.com> (raw)
This serie of patches bring thread safety to the smaller APIs used by
block-copy, namely ratelimit, progressmeter, co-shared-resource
and aiotask.
The end goal is to reduce the usage of AioContexlock in block-copy,
by introducing smaller granularity locks thus on making the block layer
thread safe.
What's missing for block-copy to be fully thread-safe is fixing
the CoSleep API to allow cross-thread sleep and wakeup.
Paolo is working on it and will post the patches once his new
CoSleep API is accepted.
Patches 1-3 work on ratelimit, 4 covers progressmeter and
5 co-shared-resources.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
v3:
* Rebase on current master (had conflicts in block-copy), remove based-on in
cover letter
Emanuele Giuseppe Esposito (2):
progressmeter: protect with a mutex
co-shared-resource: protect with a mutex
Paolo Bonzini (3):
ratelimit: treat zero speed as unlimited
block-copy: let ratelimit handle a speed of 0
blockjob: let ratelimit handle a speed of 0
block/block-copy.c | 28 ++++++--------
block/meson.build | 1 +
block/progress_meter.c | 64 +++++++++++++++++++++++++++++++
blockjob.c | 46 +++++++++++++---------
include/qemu/co-shared-resource.h | 4 +-
include/qemu/progress_meter.h | 34 ++++++++--------
include/qemu/ratelimit.h | 12 +++++-
job-qmp.c | 8 +++-
job.c | 3 ++
qemu-img.c | 9 +++--
util/qemu-co-shared-resource.c | 24 +++++++++---
11 files changed, 168 insertions(+), 65 deletions(-)
create mode 100644 block/progress_meter.c
--
2.31.1
next reply other threads:[~2021-06-14 8:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 8:11 Emanuele Giuseppe Esposito [this message]
2021-06-14 8:11 ` [PATCH v3 1/5] ratelimit: treat zero speed as unlimited Emanuele Giuseppe Esposito
2021-06-14 8:11 ` [PATCH v3 2/5] block-copy: let ratelimit handle a speed of 0 Emanuele Giuseppe Esposito
2021-06-19 12:04 ` Vladimir Sementsov-Ogievskiy
2021-06-14 8:11 ` [PATCH v3 3/5] blockjob: " Emanuele Giuseppe Esposito
2021-06-14 8:11 ` [PATCH v3 4/5] progressmeter: protect with a mutex Emanuele Giuseppe Esposito
2021-06-19 12:02 ` Vladimir Sementsov-Ogievskiy
2021-06-14 8:11 ` [PATCH v3 5/5] co-shared-resource: " Emanuele Giuseppe Esposito
2021-06-14 8:17 ` [PATCH v3 0/5] block-copy: make helper APIs thread safe Emanuele Giuseppe Esposito
2021-06-19 12:21 ` Vladimir Sementsov-Ogievskiy
2021-06-19 20:17 ` Vladimir Sementsov-Ogievskiy
2021-06-25 11:27 ` Vladimir Sementsov-Ogievskiy
-- strict thread matches above, loose matches on Subject: below --
2021-06-14 8:08 Emanuele Giuseppe Esposito
2021-06-14 8:18 ` Emanuele Giuseppe Esposito
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=20210614081130.22134-1-eesposit@redhat.com \
--to=eesposit@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@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;
as well as URLs for NNTP newsgroup(s).