Re: [PATCH v2 03/11] kvm-all: Do not allow reap vcpu dirty ring buffer if not ready

2022-11-29 Thread Hyman Huang
在 2022/11/30 6:42, Peter Xu 写道: Hi, Yong, On Mon, Nov 21, 2022 at 11:26:35AM -0500, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) When tested large vcpu size vm with dirtylimit feature, Qemu crashed due to the assertion in kvm_dirty_ring_reap_one, which assert that vcpu&#

Re: [RFC PATCH 0/1] QEMU: Dirty quota-based throttling of vcpus

2022-12-06 Thread Hyman Huang
eems that dirtylimit and quota-based are not mutually exclusive, at least we can figure out which suites what firstly depending on the test results as Peter said. -- Best regard Hyman Huang(黄勇)

[PATCH] docs/devel: Add introduction to LUKS volume with detached header

2024-02-19 Thread Hyman Huang
Signed-off-by: Hyman Huang --- MAINTAINERS | 1 + docs/devel/luks-detached-header.rst | 182 2 files changed, 183 insertions(+) create mode 100644 docs/devel/luks-detached-header.rst diff --git a/MAINTAINERS b/MAINTAINERS index a24c2b51b6

[PATCH] qapi: Craft the BlockdevCreateOptionsLUKS comment

2024-02-20 Thread Hyman Huang
Add comment in detail for commit 433957bb7f (qapi: Make parameter 'file' optional for BlockdevCreateOptionsLUKS). Signed-off-by: Hyman Huang --- qapi/block-core.json | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/

[PATCH v4 0/3] Adjust the output of x-query-virtio-status

2024-02-21 Thread Hyman Huang
the HMP output, display the human-readable information and drop the unknown bits in practice. 3. For the QMP output, remove the descriptive strings and only display bits encoded as numbers. Hyman Huang (3): qmp: Switch x-query-virtio-status back to numeric encoding virtio: Declare the

[PATCH v4 3/3] qapi: Define VhostDeviceProtocols and VirtioDeviceFeatures as plain C types

2024-02-21 Thread Hyman Huang
VhostDeviceProtocols and VirtioDeviceFeatures are only used in virtio-hmp-cmds.c. So define them as plain C types there, and drop them from the QAPI schema. Signed-off-by: Hyman Huang Reviewed-by: Markus Armbruster --- hw/virtio/virtio-hmp-cmds.c | 16 +++ qapi/virtio.json

[PATCH v4 2/3] virtio: Declare the decoding functions to static

2024-02-21 Thread Hyman Huang
qmp_decode_protocols(), qmp_decode_status(), and qmp_decode_features() are now only used in virtio-hmp-cmds.c. So move them into there, redeclare them to static, and replace the qmp_ prefix with hmp_. Signed-off-by: Hyman Huang --- hw/virtio/meson.build | 4 +- hw/virtio/virtio-hmp

[PATCH v4 1/3] qmp: Switch x-query-virtio-status back to numeric encoding

2024-02-21 Thread Hyman Huang
ible change; acceptable because x-query-virtio-status comes without a stability promise. Signed-off-by: Hyman Huang Acked-by: Markus Armbruster --- hw/virtio/virtio-hmp-cmds.c | 25 +++-- hw/virtio/virtio-qmp.c | 23 ++--- qapi/virtio.json| 192 ---

[PATCH RFC 2/3] meson.build: Support GM/T 0018-2012 cryptographic standard

2024-02-24 Thread Hyman Huang
API and enable the feature if crypto-gmt is given explictly. This feature defaults to disabled. Signed-off-by: Hyman Huang --- crypto/meson.build| 3 +++ meson.build | 30 ++ meson_options.txt | 2 ++ scripts/meson

[PATCH RFC 3/3] crypto: Allow GM/T 0018-2012 to support SM4 cipher algorithm

2024-02-24 Thread Hyman Huang
Since GM/T 0018-2012 was probed by SM4 cipher algorithm, allow it to support SM4 cipher algorithm in block encryption. Signed-off-by: Hyman Huang --- crypto/block-luks.c | 4 ++-- crypto/cipher.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/block-luks.c b

[PATCH RFC 1/3] crypto: Introduce GM/T 0018-2012 cryptographic driver

2024-02-24 Thread Hyman Huang
https://github.com/guanzhi/GM-Standards/blob/master/GMT密码行标/ GMT%200018-2012%20密码设备应用接口规范.pdf" This patch implement the basic functions of GM/T 0018-2012 standard. Currently, for block encryption, it support SM4 cipher algorithm only. Signed-off-by: Hyman Huang --- MAINTAINERS | 3

[PATCH RFC 0/3] Support GM/T 0018-2012 cryptographic standard

2024-02-24 Thread Hyman Huang
ll, we uploaded this series with the intention of receiving feedback, as the title suggests. We would welcome any suggestions and feedback regarding this feature. Hyman Huang (3): crypto: Introduce GM/T 0018-2012 cryptographic driver meson.build: Support GM/T 0018-2012 cryptographic standard

[PATCH v3 0/3] Adjust the output of x-query-virtio-status

2024-02-02 Thread Hyman Huang
output just in HMP. 2. For the HMP output, display the human-readable information and drop the unknown bits in practice. 3. For the QMP output, remove the descriptive strings and only display bits encoded as numbers. Hyman Huang (3): qmp: Switch x-query-virtio-status back to numeric

[PATCH v3 3/3] qapi: Define VhostDeviceProtocols and VirtioDeviceFeatures as plain C types

2024-02-02 Thread Hyman Huang
VhostDeviceProtocols and VirtioDeviceFeatures are only used in virtio-hmp-cmds.c. So define them as plain C types there, and drop them from the QAPI schema. Signed-off-by: Hyman Huang --- hw/virtio/virtio-hmp-cmds.c | 16 +++ qapi/virtio.json| 39

[PATCH v3 1/3] qmp: Switch x-query-virtio-status back to numeric encoding

2024-02-02 Thread Hyman Huang
change; acceptable because x-query-virtio-status does comes without a stability promise. Signed-off-by: Hyman Huang --- hw/virtio/virtio-hmp-cmds.c | 25 +++-- hw/virtio/virtio-qmp.c | 23 ++--- qapi/virtio.json| 192 3 files changed, 45 ins

[PATCH v3 2/3] virtio: Declare the decoding functions to static

2024-02-02 Thread Hyman Huang
qmp_decode_protocols(), qmp_decode_status(), and qmp_decode_features() are now only used in virtio-hmp-cmds.c. So move them into there, redeclare them to static, and replace the qmp_ prefix with hmp_. Signed-off-by: Hyman Huang --- hw/virtio/meson.build | 3 +- hw/virtio/virtio-hmp

[PATCH 2/2] scsi-disk: Fix the migration crash of the CDROM device with USB bus

2024-04-03 Thread Hyman Huang
ndef -> setup usb_msd_data_in 8/8 (scsi 8) shutting down, reason=crashed To summarize, the missing scsi request during a live migration may cause a VM configured with a CDROM to crash. Migrating the SCSI request that the scsi-disk is handling is the simple approach, assuming that it actually ex

[PATCH 1/2] scsi-disk: Introduce the migrate_emulate_scsi_request field

2024-04-03 Thread Hyman Huang
a CDROM during live migration. Signed-off-by: Hyman Huang --- hw/scsi/scsi-disk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 4bd7af9d0c..0985676f73 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c

[PATCH RESEND 2/2] scsi-disk: Fix crash of VMs configured with the CDROM device

2024-04-08 Thread Hyman Huang
ndef -> setup usb_msd_data_in 8/8 (scsi 8) shutting down, reason=crashed To summarize, the missing scsi request during a live migration may cause a VM configured with a CDROM to crash. Migrating the SCSI request that the scsi-disk is handling is the simple approach, assuming that it actually ex

[PATCH RESEND 0/2] Fix crash of VMs configured with the CDROM device

2024-04-08 Thread Hyman Huang
Hyman Huang (2): scsi-disk: Introduce the migrate_emulate_scsi_request field scsi-disk: Fix crash of VMs configured with the CDROM device hw/scsi/scsi-disk.c | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) -- 2.39.3

[PATCH RESEND 1/2] scsi-disk: Introduce the migrate_emulate_scsi_request field

2024-04-08 Thread Hyman Huang
a CDROM during live migration. Signed-off-by: Hyman Huang --- hw/scsi/scsi-disk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 4bd7af9d0c..0985676f73 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c

Re: [PATCH RESEND v3 09/10] migration: Export dirty-limit time info for observation

2023-01-17 Thread Hyman Huang
在 2023/1/11 22:38, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Export dirty limit throttle time and estimated ring full time, through which we can observe if dirty limit take effect during live migration. Suggest something like "Extend query-migra

Re: [PATCH RESEND v3 08/10] migration: Implement dirty-limit convergence algo

2023-01-17 Thread Hyman Huang
在 2023/1/11 22:11, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Implement dirty-limit convergence algo for live migration, which is kind of like auto-converge algo but using dirty-limit instead of cpu throttle to make migration convergent. Enable dirty

Re: Example output for query-vcpu-dirty-limit

2023-03-23 Thread Hyman Huang
b1066a-2549-076d-462d-1d97cd5de712 '{"execute":"query-vcpu-dirty-limit"}' --pretty { "return": [ { "limit-rate": 60, "current-rate": 3, "cpu-index": 0 }, { "limit-rate": 60, "current-rate": 3, "cpu-index": 1 } ], "id": "libvirt-20155" } -- Best regard Hyman Huang(黄勇)

Re: [PATCH v4 00/10] migration: introduce dirtylimit capability

2023-03-24 Thread Hyman Huang
Ping again, to make sure this series not be forgotten. :) Please review the last three commit if you are free. Thanks, Yong 在 2023/3/1 23:53, Hyman Huang 写道: Ping ? 在 2023/2/17 0:18, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇) v4: 1. Polish the docs and update the release version

Re: [PATCH v4 06/10] migration: Introduce dirty-limit capability

2023-03-26 Thread Hyman Huang
在 2023/3/24 22:32, Markus Armbruster 写道: Hyman Huang writes: 在 2023/3/24 20:11, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Introduce migration dirty-limit capability, which can be turned on before live migration and limit dirty page rate durty live

Re: [PATCH v4 06/10] migration: Introduce dirty-limit capability

2023-03-27 Thread Hyman Huang
在 2023/3/27 14:41, Markus Armbruster 写道: Hyman Huang writes: 在 2023/3/24 22:32, Markus Armbruster 写道: Hyman Huang writes: 在 2023/3/24 20:11, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Introduce migration dirty-limit capability, which can be turned

Re: [PATCH v3 3/3] cpus-common: implement dirty limit on vCPU

2021-11-22 Thread Hyman Huang
在 2021/11/22 15:35, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU until it reachs the quota dirtyrate given by user. introduce qmp commands set-dirty-limit/cancel-dirty

Re: [PATCH v3 3/3] cpus-common: implement dirty limit on vCPU

2021-11-22 Thread Hyman Huang
在 2021/11/22 17:10, Markus Armbruster 写道: Hyman Huang writes: =E5=9C=A8 2021/11/22 15:35, Markus Armbruster =E5=86=99=E9=81=93: huang...@chinatelecom.cn writes: From: Hyman Huang(=E9=BB=84=E5=8B=87) implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU

Re: [PATCH v5 3/3] cpus-common: implement dirty limit on vCPU

2021-11-25 Thread Hyman Huang
在 2021/11/24 23:33, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU until it reachs the quota dirtyrate given by user. Introduce qmp commands set-dirty-limit/cancel-dirty

Re: QMP command set-vcpu-dirty-limit hangs

2023-03-23 Thread Hyman Huang
angs. If I'm using it incorrectly (I have no idea), it should fail, not hang. Indeed, it seems that the command syntax is right. Would you please get the Qemu backtrace when it hang? I'll reproduce it and update the process in the coming days. Thanks for posting this issue. -- Best regard Hyman Huang(黄勇)

Re: [PATCH v17 8/8] tests/qtest/qmp-cmd-test: Ignore query-vcpu-dirty-limit test

2022-03-02 Thread Hyman Huang
在 2022/3/3 13:58, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) query-vcpu-dirty-limit success depends on enabling dirty page rate limit, so just add it to the list of skipped command to ensure qmp-cmd-test run successfully. Signed-off-by: Hyman Huang(黄勇

Re: [PATCH] migration: Introduce dirtylimit capability

2022-03-03 Thread Hyman Huang
"Sent by accident, please ignore, I'll send v1 when ready." 在 2022/3/3 18:45, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇) Signed-off-by: Hyman Huang(黄勇) --- migration/migration.c | 19 +++ migration/migration.h | 1 + migration/r

Re: [PATCH v18 7/7] softmmu/dirtylimit: Implement dirty page rate limit

2022-03-03 Thread Hyman Huang
在 2022/3/3 20:02, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle virtual CPU until it reachs the quota dirty page rate given by user. Introduce qmp commands "set-vcpu-dirty-

Re: [PATCH v12 1/5] accel/kvm/kvm-all: refactor per-vcpu dirty ring reaping

2022-02-08 Thread Hyman Huang
be expensive, so ideally we can still try the best to reap as much PFNs as possible, as long as we still don't need accuracy on RING_FULL exit events. qemu_mutex_unlock_iothread(); ret = 0; break; -- 1.8.3.1 -- Best regard Hyman Huang(黄勇)

Re: [PATCH v12 2/5] migration/dirtyrate: refactor dirty page rate calculation

2022-02-08 Thread Hyman Huang
ht (c) 2022 CHINA TELECOM CO.,LTD. + * + * Authors: + * Hyman Huang(黄勇) + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#ifndef QEMU_DIRTYRATE_H +#define QEMU_DIRTYRATE_H + +extern unsigned int cpu_list_ge

Re: [PATCH v12 4/5] softmmu/dirtylimit: implement virtual CPU throttle

2022-02-08 Thread Hyman Huang
在 2022/2/8 16:59, Peter Xu 写道: On Mon, Jan 24, 2022 at 10:10:39PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-17 Thread Hyman Huang
irtylimit_vcpu_set_quota(cpu_index, quota, true); } if (has_cpu_index) { dirtylimit_set_vcpu(cpu_index, dirty_rate, true); } else { dirtylimit_set_all(dirty_rate, true); } dirtylimit_state_unlock(); } I didn't write the cleanup path, but it's the same: we should only cleanup all the global structs in cancel-vcpu-dirty-limit when we found there's zero vcpus in track, and it should be done once there. Thanks, Sound good. -- Best Regards Hyman Huang(黄勇)

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-17 Thread Hyman Huang
在 2022/1/18 9:00, Peter Xu 写道: On Mon, Jan 17, 2022 at 10:00:57PM +0800, Hyman Huang wrote: This algorithm seems works even worse than the previous version, could you have a look on what's wrong? What number the dirty-ring-size of qemu be configured? is it the same as previous version

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Hyman Huang
if (!dirtylimit_in_service()) { /* TODO: we could have one helper to initialize all of them */ vcpu_dirty_rate_stat_initialize(); vcpu_dirty_rate_stat_start(); dirtylimit_state_initialize(); dirtylimit_vcpu_set_quota(cpu_index, quota, true); } if (has_cpu_index) { dirtylimit_set_vcpu(cpu_index, dirty_rate, true); } else { dirtylimit_set_all(dirty_rate, true); } dirtylimit_state_unlock(); } I didn't write the cleanup path, but it's the same: we should only cleanup all the global structs in cancel-vcpu-dirty-limit when we found there's zero vcpus in track, and it should be done once there. Thanks, -- Best regard Hyman Huang(黄勇)

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Hyman Huang
在 2022/1/20 17:25, Peter Xu 写道: On Thu, Jan 20, 2022 at 04:26:09PM +0800, Hyman Huang wrote: Hi,Peter. I'm working on this problem and found the reason is kind of the same as i metioned in cover letter of v10, the following is what i posted: 2. The new implementaion of throttle

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Hyman Huang
在 2022/1/20 18:56, Peter Xu 写道: On Thu, Jan 20, 2022 at 06:39:01PM +0800, Hyman Huang wrote: It only runs once per second so it shouldn't bring a lot of differences, but I'm also wondering whether we should also turn that temporarily off too when dirtylimit is enabled - we can sim

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Hyman Huang
在 2022/1/19 20:16, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-20 Thread Hyman Huang
r too). And that patch can be done on top of this patch, so it can be reviewed easier outside of dirtylimit details. Thanks, -- Best regard Hyman Huang(黄勇)

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-21 Thread Hyman Huang
te the cleanup path, but it's the same: we should only cleanup all the global structs in cancel-vcpu-dirty-limit when we found there's zero vcpus in track, and it should be done once there. Thanks, -- Best regard Hyman Huang(黄勇)

Re: [PATCH v11 1/4] migration/dirtyrate: refactor dirty page rate calculation

2022-01-21 Thread Hyman Huang
在 2022/1/17 10:19, Peter Xu 写道: On Wed, Jan 05, 2022 at 01:14:06AM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) + +static void vcpu_dirty_stat_collect(VcpuStat *stat, +DirtyPageRecord *records, +bool

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-21 Thread Hyman Huang
nabled) { +continue; +} +dirtylimit_adjust_throttle(cpu); +} +dirtylimit_state_unlock(); +} + +rcu_unregister_thread(); + +return NULL; +} + -- Best regard Hyman Huang(黄勇)

Re: [PATCH v11 3/4] softmmu/dirtylimit: implement virtual CPU throttle

2022-01-23 Thread Hyman Huang
rtylimit_state_initialize(); dirtylimit_vcpu_set_quota(cpu_index, quota, true); } if (has_cpu_index) { dirtylimit_set_vcpu(cpu_index, dirty_rate, true); } else { dirtylimit_set_all(dirty_rate, true); } dirtylimit_state_unlock(); } I didn't write the cleanup path, but it's the same: we should only cleanup all the global structs in cancel-vcpu-dirty-limit when we found there's zero vcpus in track, and it should be done once there. Thanks, -- Best regard Hyman Huang(黄勇)

Re: [PATCH v11 1/4] migration/dirtyrate: refactor dirty page rate calculation

2022-01-24 Thread Hyman Huang
在 2022/1/24 11:08, Peter Xu 写道: On Sat, Jan 22, 2022 at 11:22:37AM +0800, Hyman Huang wrote: 在 2022/1/17 10:19, Peter Xu 写道: On Wed, Jan 05, 2022 at 01:14:06AM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) + +static void vcpu_dirty_stat_collect(VcpuStat *stat

Re: [PATCH v17 6/8] softmmu/dirtylimit: Implement virtual CPU throttle

2022-05-17 Thread Hyman Huang
Thanks Manish for the comment, i'll give my explanation and any supplement are welcomed. 在 2022/5/17 1:13, manish.mishra 写道: Hi Hyman Huang, I had few doubts regarding this patch series. For the first point, m'm rudely guessing that you want to figure out how should we set the

Re: [RFC 1/6] qapi/migration: Introduce vcpu-dirtylimit-period parameters

2022-05-18 Thread Hyman Huang
在 2022/5/18 23:05, Eric Blake 写道: On Tue, May 17, 2022 at 02:35:01PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Introduce "vcpu-dirtylimit-period" migration parameters, which is used to makes dirtyrate calculation period make configurable. To implement that

Re: [PATCH v23 0/8] support dirty restraint on vCPU

2022-05-18 Thread Hyman Huang
sent by accident, please ignore, i'll resend when series is ready. 在 2022/5/19 11:25, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇) This is v23 of dirtylimit series. Since v22 posted abount 1 month ago, i did some modifications to make sure it's ready to be queued: - rebased

Re: [PATCH v12 0/6] support dirtyrate at the granualrity of vcpu

2021-10-27 Thread Hyman Huang
the max penalty is 36% during test interval(1s), the average penalty is 20%。 if we trade off accurance, the dirty ring method may be a availiabe method for user. users can select a appropriate method as they need. On 2021/10/15 10:07, Hyman Huang wrote: 在 2021/10/15 9:32, Peter Xu 写道: On

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2022-01-13 Thread Hyman Huang
在 2022/1/14 0:22, Markus Armbruster 写道: Peter Xu writes: On Fri, Dec 31, 2021 at 12:36:40AM +0800, Hyman Huang wrote: +struct { +DirtyLimitState *states; +int max_cpus; +unsigned long *bmap; /* running thread bitmap */ +unsigned long nr; +QemuThread thread

Re: [PATCH v14 3/7] migration/dirtyrate: Refactor dirty page rate calculation

2022-02-14 Thread Hyman Huang
GLOBAL_DIRTY_DIRTY_RATE, +true); -dirtyrate_global_dirty_log_stop(); - -CPU_FOREACH(cpu) { -record_dirtypages(dirty_pages, cpu, false); -} +DirtyStat.calc_time = duration / 1000; -- Best regard Hyman Huang(黄勇)

Re: [PATCH v14 6/7] softmmu/dirtylimit: Implement virtual CPU throttle

2022-02-14 Thread Hyman Huang
it_set_vcpu(int cpu_index, + uint64_t quota, + bool enable) +{ +dirtylimit_vcpu_set_quota(cpu_index, quota, enable); +trace_dirtylimit_set_vcpu(cpu_index, quota); +} This helper is not "help"ful.. How about wrapping the trace into dirtylimit_vcpu_set_quota, then drop it? Thanks, -- Best regard Hyman Huang(黄勇)

Re: [PATCH v14 6/7] softmmu/dirtylimit: Implement virtual CPU throttle

2022-02-14 Thread Hyman Huang
is not "help"ful.. How about wrapping the trace into dirtylimit_vcpu_set_quota, then drop it? Ok. Thanks, -- Best regard Hyman Huang(黄勇)

Re: [PATCH v14 7/7] softmmu/dirtylimit: Implement dirty page rate limit

2022-02-14 Thread Hyman Huang
pu_get_state(index)->enabled) { +info = dirtylimit_query_vcpu(index); +QAPI_LIST_APPEND(tail, info); +} +} + +dirtylimit_state_unlock(); + +return head; +} -- Best regard Hyman Huang(黄勇)

Re: [PATCH v15 0/7] support dirty restraint on vCPU

2022-02-15 Thread Hyman Huang
在 2022/2/16 15:42, Peter Xu 写道: On Wed, Feb 16, 2022 at 12:13:31PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) v15 - rebase on master - drop the 'init_time_ms' parameter in function vcpu_calculate_dirtyrate - drop the 'setup' field in dirty

Re: [PATCH v1 2/8] qapi/migration: Introduce x-vcpu-dirty-limit parameters

2022-09-02 Thread Hyman Huang
在 2022/9/2 16:03, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Introduce "x-vcpu-dirty-limit" migration parameter used to limit dirty page rate during live migration. "x-vcpu-dirty-limit" and "x-vcpu-dirty-limit-period&quo

Re: [PATCH v1 3/8] migration: Introduce dirty-limit capability

2022-09-02 Thread Hyman Huang
在 2022/9/2 16:07, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Introduce migration dirty-limit capability, which can be turned on before live migration and limit dirty page rate durty live migration. Introduce migrate_dirty_limit function to help check if

Re: [PATCH v3 0/2] Fix the virtio features negotiation flaw

2022-11-10 Thread Hyman Huang
在 2022/11/11 2:53, Michael S. Tsirkin 写道: On Sun, Oct 30, 2022 at 09:52:37PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) v3: -rebase on master -code clean on [PATCH v2 1/2]: keep the commit self-consistent and do not modify the logic of saving acked_features. Just

Re: [PATCH v3 1/2] vhost-user: Refactor vhost acked features saving

2022-11-11 Thread Hyman Huang
在 2022/11/11 2:56, Michael S. Tsirkin 写道: On Sun, Oct 30, 2022 at 09:52:38PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Abstract vhost acked features saving into vhost_user_save_acked_features, export it as util function. Signed-off-by: Hyman Huang(黄勇) Signed-off-by

Re: [PATCH v1 0/8] migration: introduce dirtylimit capability

2022-10-01 Thread Hyman Huang
在 2022/10/1 22:37, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) v1: - make parameter vcpu-dirty-limit experimental - switch dirty limit off when cancel migrate - add cancel logic in migration test Please review, thanks, Yong Are you still pursuing this

Re: [PATCH v1 5/8] migration: Export dirty-limit time info

2022-10-01 Thread Hyman Huang
在 2022/10/2 2:31, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Export dirty limit throttle time and estimated ring full time, through which we can observe the process of dirty limit during live migration. Signed-off-by: Hyman Huang(黄勇) [...] diff

Re: [PATCH 0/2] Fix the virito features negotiation flaw

2022-10-05 Thread Hyman Huang
Ping, Hi, Michael and Jason, how does this patchset feel think? :) Sorry if i made noise. Yong 在 2022/9/26 14:36, huang...@chinatelecom.cn 写道: From: "Hyman Huang(黄勇)" This patchset aim to fix the unexpected negotiation features for vhost-user netdev interface. Steps to rep

Re: [PATCH 0/2] Fix the virito features negotiation flaw

2022-10-26 Thread Hyman Huang
在 2022/10/26 23:00, Michael S. Tsirkin 写道: I guess I'll apply this. Can you fix a typo in subject though? Of course yes. :) Would also be nice if we had a test for this behaviour. Ok, i'll add a test patch next version. On Wed, Oct 05, 2022 at 04:17:30PM +0800, Hyman Huang wr

Re: [PATCH v2 1/2] vhost-user: Refactor vhost acked features saving

2022-10-29 Thread Hyman Huang
在 2022/10/29 16:28, Michael S. Tsirkin 写道: On Sat, Oct 29, 2022 at 01:25:44AM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Abstract vhost acked features saving into vhost_user_save_acked_features, export it as util function. Thanks for the patch! This commit log makes

Re: [PATCH v2 1/2] vhost-user: Refactor vhost acked features saving

2022-10-30 Thread Hyman Huang
在 2022/10/30 13:14, Hyman Huang 写道: 在 2022/10/29 16:28, Michael S. Tsirkin 写道: On Sat, Oct 29, 2022 at 01:25:44AM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Abstract vhost acked features saving into vhost_user_save_acked_features, export it as util function. Thanks

Re: [PATCH v4 00/10] migration: introduce dirtylimit capability

2023-03-01 Thread Hyman Huang
Ping ? 在 2023/2/17 0:18, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇) v4: 1. Polish the docs and update the release version suggested by Markus 2. Rename the migrate exported info "dirty-limit-throttle-time-per-round" to "dirty-limit-throttle-time-per-full". The

Re: [PATCH v4 3/3] vhost-user: Fix the virtio features negotiation flaw

2022-12-14 Thread Hyman Huang
_net_save_acked_features(NetClientState *nc)  { -    assert(nc->info->type == NET_CLIENT_DRIVER_VHOST_USER); -    vhost_user_save_acked_features(nc); +    if (nc->info->type == NET_CLIENT_DRIVER_VHOST_USER) { +    vhost_user_save_acked_features(nc); +    }  }  static int vhost_net_

Re: [RFC PATCH 0/1] QEMU: Dirty quota-based throttling of vcpus

2022-12-19 Thread Hyman Huang
在 2022/12/19 3:12, Shivam Kumar 写道: On 06/12/22 10:59 pm, Hyman Huang wrote: 在 2022/12/7 0:00, Peter Xu 写道: Hi, Shivam, On Tue, Dec 06, 2022 at 11:18:52AM +0530, Shivam Kumar wrote: [...] Note -- -- We understand that there is a good scope of improvement in the

Re: [PATCH RESEND v3 00/10] migration: introduce dirtylimit capability

2023-01-02 Thread Hyman Huang
Ping, Hi, David, how about the commit about live migration: [PATCH RESEND v3 08/10] migration: Implement dirty-limit convergence algo. 在 2022/12/4 1:09, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇) v3(resend): - fix the syntax error of the topic. v3: This version make some

Re: [PATCH v1 1/5] tests/migration: Move the guestperf tool to scripts directory

2024-08-09 Thread Hyman Huang
在 2024/8/9 20:57, Fabiano Rosas 写道: yong.hu...@smartx.com writes: From: Hyman Huang Guestperf was designed to test the performance of migration, with a loose connection to the fundamental test cases of QEMU. To improve the repository's structure, move it to the scripts directory. S

[PATCH 2/2] scsi-disk: Fix crash for VM configured with USB CDROM after live migration

2024-05-23 Thread Hyman Huang
emulated SCSI request be migrated during live migration, similar to the DMA SCSI request. Signed-off-by: Hyman Huang --- hw/scsi/scsi-disk.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 0985676f73..d6

[PATCH 1/2] scsi-disk: Introduce the migrate_emulate_scsi_request field

2024-05-23 Thread Hyman Huang
a CDROM during live migration. Signed-off-by: Hyman Huang Message-Id: <2da3a08785453478079cfd46d8293ee68d284391.1712577715.git.yong.hu...@smartx.com> --- hw/scsi/scsi-disk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scs

[PATCH 0/2] migrate inflight emulated SCSI request for the scsi disk device

2024-05-23 Thread Hyman Huang
ated SCSI request be migrated during live migration, similar to the DMA SCSI request. Hyman Huang (2): scsi-disk: Introduce the migrate_emulate_scsi_request field scsi-disk: Fix crash for VM configured with USB CDROM after live migration hw/scsi/scsi-disk.c | 35 +++

[PULL 0/1] Dirty page rate and dirty page limit 20240617 patches

2024-06-17 Thread Hyman Huang
The following changes since commit 05ad1440b8428b0ade9b8e5c01469adb8fbf83e3: Merge tag 'virtio-grants-v8-tag' of https://gitlab.com/sstabellini/qemu into staging (2024-06-15 20:13:06 -0700) are available in the Git repository at: https://github.com/newfriday/qemu.git tags/dirtylimit-dirtyr

[PULL 1/1] migration/dirtyrate: Fix segmentation fault

2024-06-17 Thread Hyman Huang
1-1-...@sfc.wide.ad.jp> [Assert kvm_state when kvm_dirty_ring_enabled was called to fix it. - Hyman] Signed-off-by: Hyman Huang --- accel/kvm/kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 009b49de44..854cb86b22 100644

[PATCH RFC 05/10] migration: Introduce util functions for periodic CPU throttle

2024-09-09 Thread Hyman Huang
Provide useful utilities to manage the periodic_throttle_thread's lifespan. Additionally, to set up sync mode, provide periodic_throttle_setup. Signed-off-by: Hyman Huang --- migration/ram.c| 98 +- migration/ram.h| 4 ++ migration/

[PATCH RFC 04/10] qapi/migration: Introduce the iteration-count

2024-09-09 Thread Hyman Huang
The original migration information dirty-sync-count could no longer reflect iteration count due to the introduction of periodic synchronization in the next commit; add the iteration count to compensate. Signed-off-by: Hyman Huang --- migration/migration-stats.h | 4 migration/migration.c

[PATCH RFC 08/10] migration: Introduce cpu-responsive-throttle parameter

2024-09-09 Thread Hyman Huang
To enable the responsive throttle that will be implemented in the next commit, introduce the cpu-responsive-throttle parameter. Signed-off-by: Hyman Huang --- migration/migration-hmp-cmds.c | 8 migration/options.c| 20 migration/options.h

[PATCH RFC 09/10] migration: Support responsive CPU throttle

2024-09-09 Thread Hyman Huang
ce degradation. In conclusion, this refinement significantly reduces the processing time required for the throttle percentage step to its maximum while the VM is under a high memory load. Signed-off-by: Hyman Huang --- migration/ram.c | 55 ++-- migratio

[PATCH RFC 00/10] migration: auto-converge refinements for huge VM

2024-09-09 Thread Hyman Huang
cy and hence accelerate the throttle's invocation. The RFC version of the refinement may be a rudimentary implementation, I would appreciate hearing more feedback. Yong, thanks. Hyman Huang (10): migration: Introduce structs for periodic CPU throttle migration: Refine util functio

[PATCH RFC 01/10] migration: Introduce structs for periodic CPU throttle

2024-09-09 Thread Hyman Huang
shadow_bmap, iter_bmap, iter_dirty_pages and periodic_sync_shown_up are introduced to satisfy the need for periodic CPU throttle. Meanwhile, introduce enumeration of dirty bitmap sync method. Signed-off-by: Hyman Huang --- include/exec/ramblock.h | 45

[PATCH RFC 02/10] migration: Refine util functions to support periodic CPU throttle

2024-09-09 Thread Hyman Huang
Supply the migration_bitmap_sync function along with a periodic argument. Introduce the sync_mode global variable to track the sync mode and support periodic throttling while keeping backward compatibility. Signed-off-by: Hyman Huang --- include/exec/ram_addr.h | 117

[PATCH RFC 07/10] tests/migration-tests: Add test case for periodic throttle

2024-09-09 Thread Hyman Huang
To make sure periodic throttle feature doesn't regression any features and functionalities, enable this feature in the auto-converge migration test. Signed-off-by: Hyman Huang --- tests/qtest/migration-test.c | 56 +++- 1 file changed, 55 insertions(

[PATCH RFC 03/10] qapi/migration: Introduce periodic CPU throttling parameters

2024-09-09 Thread Hyman Huang
To activate the periodic CPU throttleing feature, introduce the cpu-periodic-throttle. To control the frequency of throttling, introduce the cpu-periodic-throttle-interval. Signed-off-by: Hyman Huang --- migration/migration-hmp-cmds.c | 17 +++ migration/options.c| 54

[PATCH RFC 06/10] migration: Support periodic CPU throttle

2024-09-09 Thread Hyman Huang
the above issue by synchronizing the remote dirty bitmap and triggering the throttle periodically. This is a trade-off between synchronization overhead and CPU throttle impact. Signed-off-by: Hyman Huang --- migration/migration.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a

[PATCH RFC 10/10] tests/migration-tests: Add test case for responsive CPU throttle

2024-09-09 Thread Hyman Huang
Despite the fact that the responsive CPU throttle is enabled, the dirty sync count may not always increase because this is an optimization that might not happen in any situation. This test case just making sure it doesn't interfere with any current functionality. Signed-off-by: Hyman

[PATCH RESEND RFC 00/10] migration: auto-converge refinements for huge VM

2024-09-09 Thread Hyman Huang
cy and hence accelerate the throttle's invocation. The RFC version of the refinement may be a rudimentary implementation, I would appreciate hearing more feedback. Yong, thanks. Hyman Huang (10): migration: Introduce structs for periodic CPU throttle migration: Refine util functio

[PATCH RESEND RFC 07/10] tests/migration-tests: Add test case for periodic throttle

2024-09-09 Thread Hyman Huang
To make sure periodic throttle feature doesn't regression any features and functionalities, enable this feature in the auto-converge migration test. Signed-off-by: Hyman Huang --- tests/qtest/migration-test.c | 56 +++- 1 file changed, 55 insertions(

[PATCH RESEND RFC 06/10] migration: Support periodic CPU throttle

2024-09-09 Thread Hyman Huang
the above issue by synchronizing the remote dirty bitmap and triggering the throttle periodically. This is a trade-off between synchronization overhead and CPU throttle impact. Signed-off-by: Hyman Huang --- migration/migration.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a

[PATCH RESEND RFC 02/10] migration: Refine util functions to support periodic CPU throttle

2024-09-09 Thread Hyman Huang
Supply the migration_bitmap_sync function along with a periodic argument. Introduce the sync_mode global variable to track the sync mode and support periodic throttling while keeping backward compatibility. Signed-off-by: Hyman Huang --- include/exec/ram_addr.h | 107

[PATCH RESEND RFC 03/10] qapi/migration: Introduce periodic CPU throttling parameters

2024-09-09 Thread Hyman Huang
To activate the periodic CPU throttleing feature, introduce the cpu-periodic-throttle. To control the frequency of throttling, introduce the cpu-periodic-throttle-interval. Signed-off-by: Hyman Huang --- migration/migration-hmp-cmds.c | 17 +++ migration/options.c| 54

[PATCH RESEND RFC 09/10] migration: Support responsive CPU throttle

2024-09-09 Thread Hyman Huang
ce degradation. In conclusion, this refinement significantly reduces the processing time required for the throttle percentage step to its maximum while the VM is under a high memory load. Signed-off-by: Hyman Huang --- migration/ram.c | 55 ++-- migratio

[PATCH RESEND RFC 05/10] migration: Introduce util functions for periodic CPU throttle

2024-09-09 Thread Hyman Huang
Provide useful utilities to manage the periodic_throttle_thread's lifespan. Additionally, to set up sync mode, provide periodic_throttle_setup. Signed-off-by: Hyman Huang --- migration/ram.c| 98 +- migration/ram.h| 4 ++ migration/

[PATCH RESEND RFC 01/10] migration: Introduce structs for periodic CPU throttle

2024-09-09 Thread Hyman Huang
shadow_bmap, iter_bmap, iter_dirty_pages and periodic_sync_shown_up are introduced to satisfy the need for periodic CPU throttle. Meanwhile, introduce enumeration of dirty bitmap sync method. Signed-off-by: Hyman Huang --- include/exec/ramblock.h | 45

[PATCH RESEND RFC 08/10] migration: Introduce cpu-responsive-throttle parameter

2024-09-09 Thread Hyman Huang
To enable the responsive throttle that will be implemented in the next commit, introduce the cpu-responsive-throttle parameter. Signed-off-by: Hyman Huang --- migration/migration-hmp-cmds.c | 8 migration/options.c| 20 migration/options.h

[PATCH RESEND RFC 10/10] tests/migration-tests: Add test case for responsive CPU throttle

2024-09-09 Thread Hyman Huang
Despite the fact that the responsive CPU throttle is enabled, the dirty sync count may not always increase because this is an optimization that might not happen in any situation. This test case just making sure it doesn't interfere with any current functionality. Signed-off-by: Hyman

  1   2   3   >