[PATCH v3 0/6] block-copy: memory limit

Vladimir Sementsov-Ogievskiy posted 6 patches 4 years, 5 months ago
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191022111805.3432-1-vsementsov@virtuozzo.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
include/block/block-copy.h        |   5 +-
include/qemu/co-shared-resource.h |  71 ++++++++++++
block/block-copy.c                | 182 +++++++++++++++---------------
util/qemu-co-shared-resource.c    |  76 +++++++++++++
block/trace-events                |   6 +-
util/Makefile.objs                |   1 +
6 files changed, 249 insertions(+), 92 deletions(-)
create mode 100644 include/qemu/co-shared-resource.h
create mode 100644 util/qemu-co-shared-resource.c
[PATCH v3 0/6] block-copy: memory limit
Posted by Vladimir Sementsov-Ogievskiy 4 years, 5 months ago
I'm going to bring block-status driven, async copying process to
block-copy, to make it fast. The first step is to limit memory usage of
backup, here is it.

v3:
03: add Max's r-b
04: fix commit message and include guards, add Max's r-b
05-06: add Max's r-b

v2: [mostly by Max's comments]
Now based on master (Thank you Max!)
01: add Max's r-b
02: add Max's r-b
03: - refactor block_copy_do_copy goto/return
    - add small comment to block_copy_do_copy
04: - a lot of renaming and wording fixes
    - refactor to use "available" instead of "taken"
    - refactor co_get_from_shres
05: rebase on 04 changes
06: drop extra things from max_transfer calculation

Vladimir Sementsov-Ogievskiy (6):
  block/block-copy: allocate buffer in block_copy_with_bounce_buffer
  block/block-copy: limit copy_range_size to 16 MiB
  block/block-copy: refactor copying
  util: introduce SharedResource
  block/block-copy: add memory limit
  block/block-copy: increase buffered copy request

 include/block/block-copy.h        |   5 +-
 include/qemu/co-shared-resource.h |  71 ++++++++++++
 block/block-copy.c                | 182 +++++++++++++++---------------
 util/qemu-co-shared-resource.c    |  76 +++++++++++++
 block/trace-events                |   6 +-
 util/Makefile.objs                |   1 +
 6 files changed, 249 insertions(+), 92 deletions(-)
 create mode 100644 include/qemu/co-shared-resource.h
 create mode 100644 util/qemu-co-shared-resource.c

-- 
2.21.0


Re: [PATCH v3 0/6] block-copy: memory limit
Posted by Max Reitz 4 years, 5 months ago
On 22.10.19 13:17, Vladimir Sementsov-Ogievskiy wrote:
> I'm going to bring block-status driven, async copying process to
> block-copy, to make it fast. The first step is to limit memory usage of
> backup, here is it.
> 
> v3:
> 03: add Max's r-b
> 04: fix commit message and include guards, add Max's r-b
> 05-06: add Max's r-b
> 
> v2: [mostly by Max's comments]
> Now based on master (Thank you Max!)
> 01: add Max's r-b
> 02: add Max's r-b
> 03: - refactor block_copy_do_copy goto/return
>     - add small comment to block_copy_do_copy
> 04: - a lot of renaming and wording fixes
>     - refactor to use "available" instead of "taken"
>     - refactor co_get_from_shres
> 05: rebase on 04 changes
> 06: drop extra things from max_transfer calculation
> 
> Vladimir Sementsov-Ogievskiy (6):
>   block/block-copy: allocate buffer in block_copy_with_bounce_buffer
>   block/block-copy: limit copy_range_size to 16 MiB
>   block/block-copy: refactor copying
>   util: introduce SharedResource
>   block/block-copy: add memory limit
>   block/block-copy: increase buffered copy request
> 
>  include/block/block-copy.h        |   5 +-
>  include/qemu/co-shared-resource.h |  71 ++++++++++++
>  block/block-copy.c                | 182 +++++++++++++++---------------
>  util/qemu-co-shared-resource.c    |  76 +++++++++++++
>  block/trace-events                |   6 +-
>  util/Makefile.objs                |   1 +
>  6 files changed, 249 insertions(+), 92 deletions(-)
>  create mode 100644 include/qemu/co-shared-resource.h
>  create mode 100644 util/qemu-co-shared-resource.c

Thanks, applied to my block branch:

https://git.xanclic.moe/XanClic/qemu/commits/branch/block

Max

Re: [PATCH v3 0/6] block-copy: memory limit
Posted by Vladimir Sementsov-Ogievskiy 4 years, 5 months ago
25.10.2019 15:31, Max Reitz wrote:
> On 22.10.19 13:17, Vladimir Sementsov-Ogievskiy wrote:
>> I'm going to bring block-status driven, async copying process to
>> block-copy, to make it fast. The first step is to limit memory usage of
>> backup, here is it.
>>
>> v3:
>> 03: add Max's r-b
>> 04: fix commit message and include guards, add Max's r-b
>> 05-06: add Max's r-b
>>
>> v2: [mostly by Max's comments]
>> Now based on master (Thank you Max!)
>> 01: add Max's r-b
>> 02: add Max's r-b
>> 03: - refactor block_copy_do_copy goto/return
>>      - add small comment to block_copy_do_copy
>> 04: - a lot of renaming and wording fixes
>>      - refactor to use "available" instead of "taken"
>>      - refactor co_get_from_shres
>> 05: rebase on 04 changes
>> 06: drop extra things from max_transfer calculation
>>
>> Vladimir Sementsov-Ogievskiy (6):
>>    block/block-copy: allocate buffer in block_copy_with_bounce_buffer
>>    block/block-copy: limit copy_range_size to 16 MiB
>>    block/block-copy: refactor copying
>>    util: introduce SharedResource
>>    block/block-copy: add memory limit
>>    block/block-copy: increase buffered copy request
>>
>>   include/block/block-copy.h        |   5 +-
>>   include/qemu/co-shared-resource.h |  71 ++++++++++++
>>   block/block-copy.c                | 182 +++++++++++++++---------------
>>   util/qemu-co-shared-resource.c    |  76 +++++++++++++
>>   block/trace-events                |   6 +-
>>   util/Makefile.objs                |   1 +
>>   6 files changed, 249 insertions(+), 92 deletions(-)
>>   create mode 100644 include/qemu/co-shared-resource.h
>>   create mode 100644 util/qemu-co-shared-resource.c
> 
> Thanks, applied to my block branch:
> 
> https://git.xanclic.moe/XanClic/qemu/commits/branch/block
> 
> Max
> 

Thank you Max!

-- 
Best regards,
Vladimir