diff options
author | 2024-02-02 18:28:41 +0800 | |
---|---|---|
committer | 2024-02-05 14:42:10 +0800 | |
commit | e3cce9af10b06c51434ced4e1a6686f1ce43e124 (patch) | |
tree | eabbd21ad2f4bde133c1b5fc26a58ee9cf0f3fe4 /scripts/qapi/source.py | |
parent | migration/multifd: Separate SYNC request with normal jobs (diff) | |
download | qemu-e3cce9af10b06c51434ced4e1a6686f1ce43e124.tar.xz qemu-e3cce9af10b06c51434ced4e1a6686f1ce43e124.zip |
migration/multifd: Simplify locking in sender thread
The sender thread will yield the p->mutex before IO starts, trying to not
block the requester thread. This may be unnecessary lock optimizations,
because the requester can already read pending_job safely even without the
lock, because the requester is currently the only one who can assign a
task.
Drop that lock complication on both sides:
(1) in the sender thread, always take the mutex until job done
(2) in the requester thread, check pending_job clear lockless
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240202102857.110210-8-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'scripts/qapi/source.py')
0 files changed, 0 insertions, 0 deletions