a4a571d978
hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds
...
These two commands are missing when adding the QMP sister commands.
Add them, so developers can play with them easier.
Signed-off-by: Peter Xu <peterx@redhat.com >
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn >
Message-Id: <4cc0039fc3ad6145136770cf3b0f056c09a2910b.1623027729.git.huangy81@chinatelecom.cn >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2021-06-08 20:18:26 +01:00
7afa08cd8f
migration/dirtyrate: make sample page count configurable
...
introduce optional sample-pages argument in calc-dirty-rate,
making sample page count per GB configurable so that more
accurate dirtyrate can be calculated.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn >
Message-Id: <3103453a3b2796f929269c99a6ad81a9a7f1f405.1623027729.git.huangy81@chinatelecom.cn >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Wrapped a couple of long lines
2021-06-08 20:18:25 +01:00
a18ed79b19
migration/dirtyrate: simplify includes in dirtyrate.c
...
Remove redundant blank line which is left by Commit 662770af7c
,
also take this opportunity to remove redundant includes in dirtyrate.c.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Message-Id: <1604030281-112946-1-git-send-email-zhengchuan@huawei.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-11-12 15:52:14 +00:00
96292515c0
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-5.2-pull-request' into staging
...
Trivial Patches Pull request 20201013
# gpg: Signature made Tue 13 Oct 2020 12:49:59 BST
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu "
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com >" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu >" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com >" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier2/tags/trivial-branch-for-5.2-pull-request:
meson.build: drop duplicate 'sparc64' entry
mingw: fix error __USE_MINGW_ANSI_STDIO redefined
target/sparc/int32_helper: Remove duplicated 'Tag Overflow' entry
goldfish_rtc: change MemoryRegionOps endianness to DEVICE_NATIVE_ENDIAN
hw/char/serial: remove duplicate .class_init in serial_mm_info
block/blkdebug: fix memory leak
hw/pci: Fix typo in PCI hot-plug error message
softmmu/memory: Log invalid memory accesses
hw/acpi/piix4: Rename piix4_pm_add_propeties() to piix4_pm_add_properties()
vmdk: fix maybe uninitialized warnings
tests/test-char: Use a proper fallthrough comment
hw/block/nvme: Simplify timestamp sum
target/i386/cpu: Update comment that mentions Texinfo
qemu-img-cmds.hx: Update comment that mentions Texinfo
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-10-13 14:06:22 +01:00
662770af7c
mingw: fix error __USE_MINGW_ANSI_STDIO redefined
...
Always put osdep.h first, and remove redundant stdlib.h include.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Stefan Weil <sw@weilnetz.de >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20201008165953.884599-1-marcandre.lureau@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2020-10-13 13:33:46 +02:00
b1a859cfb0
migration/dirtyrate: present dirty rate only when querying the rate has completed
...
Make dirty_rate field optional, present dirty rate only when querying
the rate has completed.
The qmp results is shown as follow:
@unstarted:
{"return":{"status":"unstarted","start-time":0,"calc-time":0},"id":"libvirt-12"}
@measuring:
{"return":{"status":"measuring","start-time":102931,"calc-time":1},"id":"libvirt-85"}
@measured:
{"return":{"status":"measured","dirty-rate":4,"start-time":150146,"calc-time":1},"id":"libvirt-15"}
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Reviewed-by: David Edmondson <david.edmondson@oracle.com >
Message-Id: <1601350938-128320-3-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-10-12 12:39:38 +01:00
aa84b506f7
migration/dirtyrate: record start_time and calc_time while at the measuring state
...
Querying could include both the start-time and the calc-time while at the measuring
state, allowing a caller to determine when they should expect to come back looking
for a result.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Message-Id: <1601350938-128320-2-git-send-email-zhengchuan@huawei.com >
Reviewed-by: David Edmondson <david.edmondson@oracle.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-10-12 12:39:38 +01:00
3c0b5dffc1
migration/dirtyrate: Add trace_calls to make it easier to debug
...
Add trace_calls to make it easier to debug
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: David Edmondson <david.edmondson@oracle.com >
Message-Id: <1600237327-33618-13-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-09-25 12:45:58 +01:00
4c437254b8
migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function
...
Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be called
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Message-Id: <1600237327-33618-12-git-send-email-zhengchuan@huawei.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
atomic function fixup
Wording fixup in migration.json based on Eric's review
2020-09-25 12:45:58 +01:00
cf0bbb49d8
migration/dirtyrate: Implement calculate_dirtyrate() function
...
Implement calculate_dirtyrate() function.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Signed-off-by: YanYing Zhuang <ann.zhuangyanying@huawei.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Message-Id: <1600237327-33618-11-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-09-25 12:45:58 +01:00
eca582249c
migration/dirtyrate: Implement set_sample_page_period() and is_sample_period_valid()
...
Implement is_sample_period_valid() to check if the sample period is vaild and
do set_sample_page_period() to sleep specific time between sample actions.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: David Edmondson <david.edmondson@oracle.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Message-Id: <1600237327-33618-10-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-09-25 12:45:58 +01:00
f82583cdc0
migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE
...
In order to sample real RAM, skip ramblock with size below MIN_RAMBLOCK_SIZE
which is set as 128M.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Reviewed-by: David Edmondson <david.edmondson@oracle.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Message-Id: <1600237327-33618-9-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-09-25 12:45:57 +01:00
9c04387b88
migration/dirtyrate: Compare page hash results for recorded sampled page
...
Compare page hash results for recorded sampled page.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Signed-off-by: YanYing Zhuang <ann.zhuangyanying@huawei.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Message-Id: <1600237327-33618-8-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-09-25 12:45:57 +01:00
ba0e519f95
migration/dirtyrate: Record hash results for each sampled page
...
Record hash results for each sampled page, crc32 is taken to calculate
hash results for each sampled length in TARGET_PAGE_SIZE.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Signed-off-by: YanYing Zhuang <ann.zhuangyanying@huawei.com >
Reviewed-by: David Edmondson <david.edmondson@oracle.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Message-Id: <1600237327-33618-7-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-09-25 12:45:57 +01:00
3ded54b1bd
migration/dirtyrate: move RAMBLOCK_FOREACH_MIGRATABLE into ram.h
...
RAMBLOCK_FOREACH_MIGRATABLE is need in dirtyrate measure,
move the existing definition up into migration/ram.h
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: David Edmondson <david.edmondson@oracle.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Message-Id: <1600237327-33618-6-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-09-25 12:45:57 +01:00
c9a58d719b
migration/dirtyrate: Add dirtyrate statistics series functions
...
Add dirtyrate statistics functions to record/update dirtyrate info.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Message-Id: <1600237327-33618-5-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-09-25 12:45:57 +01:00
7df3aa3083
migration/dirtyrate: add DirtyRateStatus to denote calculation status
...
add DirtyRateStatus to denote calculating status.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Message-Id: <1600237327-33618-3-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
atomic name fixup
2020-09-25 12:45:57 +01:00
4240dceeb3
migration/dirtyrate: setup up query-dirtyrate framwork
...
Add get_dirtyrate_thread() functions to setup query-dirtyrate
framework.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com >
Signed-off-by: YanYing Zhuang <ann.zhuangyanying@huawei.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: David Edmondson <david.edmondson@oracle.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Message-Id: <1600237327-33618-2-git-send-email-zhengchuan@huawei.com >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-09-25 12:45:57 +01:00