aboutsummaryrefslogtreecommitdiff
path: root/tests/migration/guestperf/hardware.py
diff options
context:
space:
mode:
authorHyman Huang <yong.huang@smartx.com>2023-11-01 22:04:07 +0800
committerJuan Quintela <quintela@redhat.com>2023-11-03 07:48:25 +0100
commit4cc563d460b6e8a29d18b27381dab8ca0621f2da (patch)
tree6a7c56ad8ab2861d076bf1259ed9f865969756aa /tests/migration/guestperf/hardware.py
parent17257b90be4f51dd3040ca2e472201407b2327c4 (diff)
tests/migration: Introduce dirty-ring-size option into guestperf
Dirty ring size configuration is not supported by guestperf tool. Introduce dirty-ring-size (ranges in [1024, 65536]) option so developers can play with dirty-ring and dirty-limit feature easier. To set dirty ring size with 4096 during migration test: $ ./tests/migration/guestperf.py --dirty-ring-size 4096 xxx Signed-off-by: Hyman Huang <yong.huang@smartx.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <8a388cec5c1f73a34d42515bbc43837e97ee3839.1698847223.git.yong.huang@smartx.com>
Diffstat (limited to 'tests/migration/guestperf/hardware.py')
-rw-r--r--tests/migration/guestperf/hardware.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/migration/guestperf/hardware.py b/tests/migration/guestperf/hardware.py
index 3145785ffd..f779cc050b 100644
--- a/tests/migration/guestperf/hardware.py
+++ b/tests/migration/guestperf/hardware.py
@@ -23,7 +23,8 @@ class Hardware(object):
src_cpu_bind=None, src_mem_bind=None,
dst_cpu_bind=None, dst_mem_bind=None,
prealloc_pages = False,
- huge_pages=False, locked_pages=False):
+ huge_pages=False, locked_pages=False,
+ dirty_ring_size=0):
self._cpus = cpus
self._mem = mem # GiB
self._src_mem_bind = src_mem_bind # List of NUMA nodes
@@ -33,6 +34,7 @@ class Hardware(object):
self._prealloc_pages = prealloc_pages
self._huge_pages = huge_pages
self._locked_pages = locked_pages
+ self._dirty_ring_size = dirty_ring_size
def serialize(self):
@@ -46,6 +48,7 @@ class Hardware(object):
"prealloc_pages": self._prealloc_pages,
"huge_pages": self._huge_pages,
"locked_pages": self._locked_pages,
+ "dirty_ring_size": self._dirty_ring_size,
}
@classmethod
@@ -59,4 +62,5 @@ class Hardware(object):
data["dst_mem_bind"],
data["prealloc_pages"],
data["huge_pages"],
- data["locked_pages"])
+ data["locked_pages"],
+ data["dirty_ring_size"])