qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 0/7] block-copy: protect block-copy internal structures


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v2 0/7] block-copy: protect block-copy internal structures
Date: Thu, 20 May 2021 16:47:50 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2

18.05.2021 13:07, Emanuele Giuseppe Esposito wrote:
This serie of patches aims to reduce the usage of the global
AioContexlock in block-copy, by introducing smaller granularity
locks thus on making the block layer thread safe.

This serie depends on Paolo's coroutine_sleep API and my previous
serie that brings thread safety to the smaller API used by block-copy,
like ratelimit, progressmeter abd co-shared-resource.

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.

Patch 1 introduces the .method field instead of .use_copy_range
and .copy_size, so that it can be later used as atomic.
Patch 2-3 provide comments and refactoring in preparation to
the locks added in patch 4 on BlockCopyTask, patch 5-6 on
BlockCopyCallState and 7 BlockCopyState.

Based-on: <20210517100548.28806-1-pbonzini@redhat.com>
Based-on: <20210518094058.25952-1-eesposit@redhat.com>

Hi! I failed to apply this all. Could you please export your branch with your 
patches at some public git repo?

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
v1 -> v2:
* More field categorized as IN/State/OUT in the various struct, better
   documentation in the structs
* Fix a couple of places where I missed locks [Vladimir, Paolo]


Emanuele Giuseppe Esposito (6):
   block-copy: improve documentation of BlockCopyTask and BlockCopyState
     types and functions
   block-copy: move progress_set_remaining in block_copy_task_end
   block-copy: add a CoMutex to the BlockCopyTask list
   block-copy: add QemuMutex lock for BlockCopyCallState list
   block-copy: atomic .cancelled and .finished fields in
     BlockCopyCallState
   block-copy: protect BlockCopyState .method fields

Paolo Bonzini (1):
   block-copy: streamline choice of copy_range vs. read/write

  block/block-copy.c | 234 +++++++++++++++++++++++++++++----------------
  1 file changed, 150 insertions(+), 84 deletions(-)



--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]