Re: [PATCH v4 0/7] migration/dirtyrate: Introduce APIs for getting domain memory dirty rate

2021-01-25 Thread Hao Wang
Yes, and sorry for reply late. I'll try to upload v5 in a week.

BR,
Hao

On 2021/1/25 18:40, Michal Privoznik wrote:
> On 11/7/20 10:41 AM, Hao Wang wrote:
>>
> 
> Hey, any plans on v5?
> 
> Michal
> 
> .



Re: [PATCH v4 0/7] migration/dirtyrate: Introduce APIs for getting domain memory dirty rate

2021-01-25 Thread Michal Privoznik

On 11/7/20 10:41 AM, Hao Wang wrote:
>

Hey, any plans on v5?

Michal



Re: [PATCH v4 0/7] migration/dirtyrate: Introduce APIs for getting domain memory dirty rate

2020-11-09 Thread Hao Wang
I quite agree with you and will modify that in my next realeases. Thanks for 
your suggestion!


On 2020/11/10 9:34, Han Han wrote:
> 
> 
> On Sat, Nov 7, 2020 at 5:54 PM Hao Wang  > wrote:
> 
> V3 -> V4:
> define flags to unsigned int
> fix some compile warnings
> 
> V2 -> V3:
> reorganize patchset to fix compile warning
> 
> V1 -> V2:
> replace QEMU_JOB_ASYNC with QEMU_JOB_QUERY
> 
> 
> Sometimes domain's memory dirty rate is expected by user in order to
> decide whether it's proper to be migrated out or not.
> 
> We have already completed the QEMU part of the capability:
> 
> https://patchew.org/QEMU/1600237327-33618-1-git-send-email-zhengch...@huawei.com/
> And this serial of patches introduce the corresponding LIBVIRT part --
> DomainGetDirtyRateInfo API and corresponding virsh api -- "getdirtyrate".
> 
> 
> instructions:
> bash# virsh getdirtyrate --help
>   NAME
>     getdirtyrate - Get a vm's memory dirty rate
> 
> I think it is better to name the virsh cmd as 'domgetdirtyrate' or 
> 'domdirtyrate' because
> the most of virsh cmds for getting the info of VM have the prefix dom.
> 




Re: [PATCH v4 0/7] migration/dirtyrate: Introduce APIs for getting domain memory dirty rate

2020-11-09 Thread Han Han
On Sat, Nov 7, 2020 at 5:54 PM Hao Wang  wrote:

> V3 -> V4:
> define flags to unsigned int
> fix some compile warnings
>
> V2 -> V3:
> reorganize patchset to fix compile warning
>
> V1 -> V2:
> replace QEMU_JOB_ASYNC with QEMU_JOB_QUERY
>
>
> Sometimes domain's memory dirty rate is expected by user in order to
> decide whether it's proper to be migrated out or not.
>
> We have already completed the QEMU part of the capability:
>
> https://patchew.org/QEMU/1600237327-33618-1-git-send-email-zhengch...@huawei.com/
> And this serial of patches introduce the corresponding LIBVIRT part --
> DomainGetDirtyRateInfo API and corresponding virsh api -- "getdirtyrate".
>
>
> instructions:
> bash# virsh getdirtyrate --help
>   NAME
> getdirtyrate - Get a vm's memory dirty rate
>
I think it is better to name the virsh cmd as 'domgetdirtyrate' or
'domdirtyrate' because
the most of virsh cmds for getting the info of VM have the prefix dom.

>
>   SYNOPSIS
> getdirtyrate  [--seconds ] [--calculate] [--query]
>
>   DESCRIPTION
> Get memory dirty rate of a domain in order to decide whether it's
> proper to be migrated out or not.
>
>   OPTIONS
> [--domain]   domain name, id or uuid
> --seconds   calculate memory dirty rate within specified
> seconds, a valid range of values is [1, 60], and would default to 1s.
> --calculate  calculate dirty rate only, can be used together with
> --query, either or both is expected, otherwise would default to both.
> --query  query dirty rate only, can be used together with
> --calculate, either or both is expected, otherwise would default to both.
>
>
> example:
> bash# virsh getdirtyrate --calculate --query --domain vm0 --seconds 1
> status:measured
> startTime: 820148
> calcTime:  1 s
> dirtyRate: 6 MB/s
>
>
> *** BLURB HERE ***
>
> Hao Wang (7):
>   migration/dirtyrate: Introduce virDomainDirtyRateInfo structure
>   migration/dirtyrate: set up framwork of domainGetDirtyRateInfo API
>   migration/dirtyrate: Implement qemuDomainCalculateDirtyRate
>   migration/dirtyrate: Implement qemuDomainQueryDirtyRate
>   migration/dirtyrate: Implement qemuMonitorJSONExtractDirtyRateInfo
>   migration/dirtyrate: Implement qemuDomainGetDirtyRateInfo
>   migration/dirtyrate: Introduce getdirtyrate virsh api
>
>  include/libvirt/libvirt-domain.h |  57 
>  src/driver-hypervisor.h  |   7 ++
>  src/libvirt-domain.c |  46 +
>  src/libvirt_public.syms  |   5 ++
>  src/qemu/qemu_driver.c   |  68 +++
>  src/qemu/qemu_migration.c|  59 
>  src/qemu/qemu_migration.h|  10 +++
>  src/qemu/qemu_monitor.c  |  24 +++
>  src/qemu/qemu_monitor.h  |   8 +++
>  src/qemu/qemu_monitor_json.c |  97 ++
>  src/qemu/qemu_monitor_json.h |   8 +++
>  src/remote/remote_driver.c   |   1 +
>  src/remote/remote_protocol.x |  21 +-
>  tools/virsh-domain.c | 112 +++
>  14 files changed, 522 insertions(+), 1 deletion(-)
>
> --
> 2.23.0
>
>
>


[PATCH v4 0/7] migration/dirtyrate: Introduce APIs for getting domain memory dirty rate

2020-11-07 Thread Hao Wang
V3 -> V4:
define flags to unsigned int
fix some compile warnings

V2 -> V3:
reorganize patchset to fix compile warning

V1 -> V2:
replace QEMU_JOB_ASYNC with QEMU_JOB_QUERY


Sometimes domain's memory dirty rate is expected by user in order to
decide whether it's proper to be migrated out or not.

We have already completed the QEMU part of the capability:
https://patchew.org/QEMU/1600237327-33618-1-git-send-email-zhengch...@huawei.com/
And this serial of patches introduce the corresponding LIBVIRT part --
DomainGetDirtyRateInfo API and corresponding virsh api -- "getdirtyrate".


instructions:
bash# virsh getdirtyrate --help
  NAME
getdirtyrate - Get a vm's memory dirty rate

  SYNOPSIS
getdirtyrate  [--seconds ] [--calculate] [--query]

  DESCRIPTION
Get memory dirty rate of a domain in order to decide whether it's proper to 
be migrated out or not.

  OPTIONS
[--domain]   domain name, id or uuid
--seconds   calculate memory dirty rate within specified seconds, a 
valid range of values is [1, 60], and would default to 1s.
--calculate  calculate dirty rate only, can be used together with 
--query, either or both is expected, otherwise would default to both.
--query  query dirty rate only, can be used together with 
--calculate, either or both is expected, otherwise would default to both.


example:
bash# virsh getdirtyrate --calculate --query --domain vm0 --seconds 1
status:measured
startTime: 820148
calcTime:  1 s
dirtyRate: 6 MB/s


*** BLURB HERE ***

Hao Wang (7):
  migration/dirtyrate: Introduce virDomainDirtyRateInfo structure
  migration/dirtyrate: set up framwork of domainGetDirtyRateInfo API
  migration/dirtyrate: Implement qemuDomainCalculateDirtyRate
  migration/dirtyrate: Implement qemuDomainQueryDirtyRate
  migration/dirtyrate: Implement qemuMonitorJSONExtractDirtyRateInfo
  migration/dirtyrate: Implement qemuDomainGetDirtyRateInfo
  migration/dirtyrate: Introduce getdirtyrate virsh api

 include/libvirt/libvirt-domain.h |  57 
 src/driver-hypervisor.h  |   7 ++
 src/libvirt-domain.c |  46 +
 src/libvirt_public.syms  |   5 ++
 src/qemu/qemu_driver.c   |  68 +++
 src/qemu/qemu_migration.c|  59 
 src/qemu/qemu_migration.h|  10 +++
 src/qemu/qemu_monitor.c  |  24 +++
 src/qemu/qemu_monitor.h  |   8 +++
 src/qemu/qemu_monitor_json.c |  97 ++
 src/qemu/qemu_monitor_json.h |   8 +++
 src/remote/remote_driver.c   |   1 +
 src/remote/remote_protocol.x |  21 +-
 tools/virsh-domain.c | 112 +++
 14 files changed, 522 insertions(+), 1 deletion(-)

-- 
2.23.0