Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
abaa1100
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
abaa1100
编写于
6月 20, 2016
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: Add support for cpu throttling parameters
Signed-off-by:
N
Jiri Denemark
<
jdenemar@redhat.com
>
上级
8d58952b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
4 deletion
+23
-4
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.c
+8
-3
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor.h
+6
-0
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.c
+4
-0
tests/qemumonitorjsontest.c
tests/qemumonitorjsontest.c
+5
-1
未找到文件。
src/qemu/qemu_monitor.c
浏览文件 @
abaa1100
...
...
@@ -2173,16 +2173,21 @@ qemuMonitorSetMigrationParams(qemuMonitorPtr mon,
qemuMonitorMigrationParamsPtr
params
)
{
VIR_DEBUG
(
"compressLevel=%d:%d compressThreads=%d:%d "
"decompressThreads=%d:%d"
,
"decompressThreads=%d:%d cpuThrottleInitial=%d:%d "
"cpuThrottleIncrement=%d:%d"
,
params
->
compressLevel_set
,
params
->
compressLevel
,
params
->
compressThreads_set
,
params
->
compressThreads
,
params
->
decompressThreads_set
,
params
->
decompressThreads
);
params
->
decompressThreads_set
,
params
->
decompressThreads
,
params
->
cpuThrottleInitial_set
,
params
->
cpuThrottleInitial
,
params
->
cpuThrottleIncrement_set
,
params
->
cpuThrottleIncrement
);
QEMU_CHECK_MONITOR_JSON
(
mon
);
if
(
!
params
->
compressLevel_set
&&
!
params
->
compressThreads_set
&&
!
params
->
decompressThreads_set
)
!
params
->
decompressThreads_set
&&
!
params
->
cpuThrottleInitial_set
&&
!
params
->
cpuThrottleIncrement_set
)
return
0
;
return
qemuMonitorJSONSetMigrationParams
(
mon
,
params
);
...
...
src/qemu/qemu_monitor.h
浏览文件 @
abaa1100
...
...
@@ -496,6 +496,12 @@ struct _qemuMonitorMigrationParams {
bool
decompressThreads_set
;
int
decompressThreads
;
bool
cpuThrottleInitial_set
;
int
cpuThrottleInitial
;
bool
cpuThrottleIncrement_set
;
int
cpuThrottleIncrement
;
};
int
qemuMonitorGetMigrationParams
(
qemuMonitorPtr
mon
,
...
...
src/qemu/qemu_monitor_json.c
浏览文件 @
abaa1100
...
...
@@ -2560,6 +2560,8 @@ qemuMonitorJSONGetMigrationParams(qemuMonitorPtr mon,
PARSE
(
compressLevel
,
"compress-level"
);
PARSE
(
compressThreads
,
"compress-threads"
);
PARSE
(
decompressThreads
,
"decompress-threads"
);
PARSE
(
cpuThrottleInitial
,
"cpu-throttle-initial"
);
PARSE
(
cpuThrottleIncrement
,
"cpu-throttle-increment"
);
#undef PARSE
...
...
@@ -2600,6 +2602,8 @@ qemuMonitorJSONSetMigrationParams(qemuMonitorPtr mon,
APPEND
(
compressLevel
,
"compress-level"
);
APPEND
(
compressThreads
,
"compress-threads"
);
APPEND
(
decompressThreads
,
"decompress-threads"
);
APPEND
(
cpuThrottleInitial
,
"cpu-throttle-initial"
);
APPEND
(
cpuThrottleIncrement
,
"cpu-throttle-increment"
);
#undef APPEND
...
...
tests/qemumonitorjsontest.c
浏览文件 @
abaa1100
...
...
@@ -1630,8 +1630,10 @@ testQemuMonitorJSONqemuMonitorJSONGetMigrationParams(const void *data)
"{"
"
\"
return
\"
: {"
"
\"
decompress-threads
\"
: 2,"
"
\"
cpu-throttle-increment
\"
: 10,"
"
\"
compress-threads
\"
: 8,"
"
\"
compress-level
\"
: 1"
"
\"
compress-level
\"
: 1,"
"
\"
cpu-throttle-initial
\"
: 20"
" }"
"}"
)
<
0
)
{
goto
cleanup
;
...
...
@@ -1658,6 +1660,8 @@ testQemuMonitorJSONqemuMonitorJSONGetMigrationParams(const void *data)
CHECK
(
compressLevel
,
"compress-level"
,
1
);
CHECK
(
compressThreads
,
"compress-threads"
,
8
);
CHECK
(
decompressThreads
,
"decompress-threads"
,
2
);
CHECK
(
cpuThrottleInitial
,
"cpu-throttle-initial"
,
20
);
CHECK
(
cpuThrottleIncrement
,
"cpu-throttle-increment"
,
10
);
#undef CHECK
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录