From 8abc81150f2de51eabd75ef13117f6f1561a18a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hyman=20Huang=28=E9=BB=84=E5=8B=87=29?= Date: Fri, 28 Jul 2023 17:38:07 +0800 Subject: [PATCH 1/3] qapi: Reformat the dirty-limit migration doc comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reformat the dirty-limit migration doc comments to conform to current conventions as commit a937b6aa739 (qapi: Reformat doc comments to conform to current conventions). Signed-off-by: Hyman Huang(黄勇) Message-ID: <169073570563.19893.2928364761104733482-1@git.sr.ht> Reviewed-by: Markus Armbruster [Whitespace tidied up] Signed-off-by: Markus Armbruster --- qapi/migration.json | 67 ++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index 6b49593d2f..dffa60fd91 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -258,17 +258,17 @@ # blocked. Present and non-empty when migration is blocked. # (since 6.0) # -# @dirty-limit-throttle-time-per-round: Maximum throttle time (in microseconds) of virtual -# CPUs each dirty ring full round, which shows how -# MigrationCapability dirty-limit affects the guest -# during live migration. (since 8.1) +# @dirty-limit-throttle-time-per-round: Maximum throttle time +# (in microseconds) of virtual CPUs each dirty ring full round, +# which shows how MigrationCapability dirty-limit affects the +# guest during live migration. (Since 8.1) # -# @dirty-limit-ring-full-time: Estimated average dirty ring full time (in microseconds) -# each dirty ring full round, note that the value equals -# dirty ring memory size divided by average dirty page rate -# of virtual CPU, which can be used to observe the average -# memory load of virtual CPU indirectly. Note that zero -# means guest doesn't dirty memory (since 8.1) +# @dirty-limit-ring-full-time: Estimated average dirty ring full time +# (in microseconds) for each dirty ring full round. The value +# equals the dirty ring memory size divided by the average dirty +# page rate of the virtual CPU, which can be used to observe the +# average memory load of the virtual CPU indirectly. Note that +# zero means guest doesn't dirty memory. (Since 8.1) # # Since: 0.14 ## @@ -519,15 +519,14 @@ # are present. 'return-path' capability must be enabled to use # it. (since 8.1) # -# @dirty-limit: If enabled, migration will use the dirty-limit algo to -# throttle down guest instead of auto-converge algo. -# Throttle algo only works when vCPU's dirtyrate greater -# than 'vcpu-dirty-limit', read processes in guest os -# aren't penalized any more, so this algo can improve -# performance of vCPU during live migration. This is an -# optional performance feature and should not affect the -# correctness of the existing auto-converge algo. -# (since 8.1) +# @dirty-limit: If enabled, migration will use the dirty-limit +# algorithim to throttle down guest instead of auto-converge +# algorithim. Throttle algorithim only works when vCPU's dirtyrate +# greater than 'vcpu-dirty-limit', read processes in guest os +# aren't penalized any more, so this algorithim can improve +# performance of vCPU during live migration. This is an optional +# performance feature and should not affect the correctness of the +# existing auto-converge algorithim. (Since 8.1) # # Features: # @@ -822,17 +821,17 @@ # Nodes are mapped to their block device name if there is one, and # to their node name otherwise. (Since 5.2) # -# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty limit during -# live migration. Should be in the range 1 to 1000ms, -# defaults to 1000ms. (Since 8.1) +# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty +# limit during live migration. Should be in the range 1 to 1000ms. +# Defaults to 1000ms. (Since 8.1) # # @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration. -# Defaults to 1. (Since 8.1) +# Defaults to 1. (Since 8.1) # # Features: # # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period -# are experimental. +# are experimental. # # Since: 2.4 ## @@ -988,17 +987,17 @@ # Nodes are mapped to their block device name if there is one, and # to their node name otherwise. (Since 5.2) # -# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty limit during -# live migration. Should be in the range 1 to 1000ms, -# defaults to 1000ms. (Since 8.1) +# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty +# limit during live migration. Should be in the range 1 to 1000ms. +# Defaults to 1000ms. (Since 8.1) # # @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration. -# Defaults to 1. (Since 8.1) +# Defaults to 1. (Since 8.1) # # Features: # # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period -# are experimental. +# are experimental. # # TODO: either fuse back into MigrationParameters, or make # MigrationParameters members mandatory @@ -1191,17 +1190,17 @@ # Nodes are mapped to their block device name if there is one, and # to their node name otherwise. (Since 5.2) # -# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty limit during -# live migration. Should be in the range 1 to 1000ms, -# defaults to 1000ms. (Since 8.1) +# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty +# limit during live migration. Should be in the range 1 to 1000ms. +# Defaults to 1000ms. (Since 8.1) # # @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration. -# Defaults to 1. (Since 8.1) +# Defaults to 1. (Since 8.1) # # Features: # # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period -# are experimental. +# are experimental. # # Since: 2.4 ## From ef965377325e186ce1f73e5f40d07d77e2cc9410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hyman=20Huang=28=E9=BB=84=E5=8B=87=29?= Date: Fri, 28 Jul 2023 23:10:40 +0800 Subject: [PATCH 2/3] qapi: Craft the dirty-limit capability comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hyman Huang(黄勇) Message-ID: <169073570563.19893.2928364761104733482-2@git.sr.ht> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi/migration.json | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index dffa60fd91..8843e74b59 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -519,14 +519,11 @@ # are present. 'return-path' capability must be enabled to use # it. (since 8.1) # -# @dirty-limit: If enabled, migration will use the dirty-limit -# algorithim to throttle down guest instead of auto-converge -# algorithim. Throttle algorithim only works when vCPU's dirtyrate -# greater than 'vcpu-dirty-limit', read processes in guest os -# aren't penalized any more, so this algorithim can improve -# performance of vCPU during live migration. This is an optional -# performance feature and should not affect the correctness of the -# existing auto-converge algorithim. (Since 8.1) +# @dirty-limit: If enabled, migration will throttle vCPUs as needed to +# keep their dirty page rate within @vcpu-dirty-limit. This can +# improve responsiveness of large guests during live migration, +# and can result in more stable read performance. Requires KVM +# with accelerator property "dirty-ring-size" set. (Since 8.1) # # Features: # From 2b3edd95186dc505f21d823119cdd0dfb23b3ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hyman=20Huang=28=E9=BB=84=E5=8B=87=29?= Date: Thu, 27 Jul 2023 02:10:09 +0800 Subject: [PATCH 3/3] MAINTAINERS: Add section "Migration dirty limit and dirty page rate" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I've built interests in dirty limit and dirty page rate features and also have been working on projects related to this subsystem. Add a section to the MAINTAINERS file for migration dirty limit and dirty page rate. Add myself as a maintainer for this subsystem so that I can help to improve the dirty limit algorithm and review the patches about dirty page rate. Signed-off-by: Hyman Huang(黄勇) Acked-by: Peter Xu Message-ID: <169073570563.19893.2928364761104733482-3@git.sr.ht> Acked-by: Markus Armbruster Signed-off-by: Markus Armbruster --- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 12e59b6b27..6111b6b4d9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3209,6 +3209,15 @@ F: qapi/migration.json F: tests/migration/ F: util/userfaultfd.c +Migration dirty limit and dirty page rate +M: Hyman Huang +S: Maintained +F: softmmu/dirtylimit.c +F: include/sysemu/dirtylimit.h +F: migration/dirtyrate.c +F: migration/dirtyrate.h +F: include/sysemu/dirtyrate.h + D-Bus M: Marc-André Lureau S: Maintained