Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
d85c3a54
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d85c3a54
编写于
6月 21, 2016
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Report auto convergence throttle rate in migration stats
Signed-off-by:
N
Jiri Denemark
<
jdenemar@redhat.com
>
上级
445853e1
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
34 addition
and
0 deletion
+34
-0
include/libvirt/libvirt-domain.h
include/libvirt/libvirt-domain.h
+8
-0
src/qemu/qemu_domain.c
src/qemu/qemu_domain.c
+6
-0
src/qemu/qemu_migration.c
src/qemu/qemu_migration.c
+6
-0
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor.h
+2
-0
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.c
+3
-0
tools/virsh-domain.c
tools/virsh-domain.c
+9
-0
未找到文件。
include/libvirt/libvirt-domain.h
浏览文件 @
d85c3a54
...
@@ -2985,6 +2985,14 @@ int virDomainAbortJob(virDomainPtr dom);
...
@@ -2985,6 +2985,14 @@ int virDomainAbortJob(virDomainPtr dom);
*/
*/
# define VIR_DOMAIN_JOB_COMPRESSION_OVERFLOW "compression_overflow"
# define VIR_DOMAIN_JOB_COMPRESSION_OVERFLOW "compression_overflow"
/**
* VIR_DOMAIN_JOB_AUTO_CONVERGE_THROTTLE:
*
* virDomainGetJobStats field: current percentage guest CPUs are throttled
* to when auto-convergence decided migration was not converging, as
* VIR_TYPED_PARAM_INT.
*/
# define VIR_DOMAIN_JOB_AUTO_CONVERGE_THROTTLE "auto_converge_throttle"
/**
/**
...
...
src/qemu/qemu_domain.c
浏览文件 @
d85c3a54
...
@@ -458,6 +458,12 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo,
...
@@ -458,6 +458,12 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo,
goto
error
;
goto
error
;
}
}
if
(
stats
->
cpu_throttle_percentage
&&
virTypedParamsAddInt
(
&
par
,
&
npar
,
&
maxpar
,
VIR_DOMAIN_JOB_AUTO_CONVERGE_THROTTLE
,
stats
->
cpu_throttle_percentage
)
<
0
)
goto
error
;
*
type
=
jobInfo
->
type
;
*
type
=
jobInfo
->
type
;
*
params
=
par
;
*
params
=
par
;
*
nparams
=
npar
;
*
nparams
=
npar
;
...
...
src/qemu/qemu_migration.c
浏览文件 @
d85c3a54
...
@@ -807,6 +807,10 @@ qemuMigrationCookieStatisticsXMLFormat(virBufferPtr buf,
...
@@ -807,6 +807,10 @@ qemuMigrationCookieStatisticsXMLFormat(virBufferPtr buf,
stats
->
xbzrle_overflow
);
stats
->
xbzrle_overflow
);
}
}
virBufferAsprintf
(
buf
,
"<%1$s>%2$d</%1$s>
\n
"
,
VIR_DOMAIN_JOB_AUTO_CONVERGE_THROTTLE
,
stats
->
cpu_throttle_percentage
);
virBufferAdjustIndent
(
buf
,
-
2
);
virBufferAdjustIndent
(
buf
,
-
2
);
virBufferAddLit
(
buf
,
"</statistics>
\n
"
);
virBufferAddLit
(
buf
,
"</statistics>
\n
"
);
}
}
...
@@ -1152,6 +1156,8 @@ qemuMigrationCookieStatisticsXMLParse(xmlXPathContextPtr ctxt)
...
@@ -1152,6 +1156,8 @@ qemuMigrationCookieStatisticsXMLParse(xmlXPathContextPtr ctxt)
virXPathULongLong
(
"string(./"
VIR_DOMAIN_JOB_COMPRESSION_OVERFLOW
"[1])"
,
virXPathULongLong
(
"string(./"
VIR_DOMAIN_JOB_COMPRESSION_OVERFLOW
"[1])"
,
ctxt
,
&
stats
->
xbzrle_overflow
);
ctxt
,
&
stats
->
xbzrle_overflow
);
virXPathInt
(
"string(./"
VIR_DOMAIN_JOB_AUTO_CONVERGE_THROTTLE
"[1])"
,
ctxt
,
&
stats
->
cpu_throttle_percentage
);
cleanup:
cleanup:
ctxt
->
node
=
save_ctxt
;
ctxt
->
node
=
save_ctxt
;
return
jobInfo
;
return
jobInfo
;
...
...
src/qemu/qemu_monitor.h
浏览文件 @
d85c3a54
...
@@ -562,6 +562,8 @@ struct _qemuMonitorMigrationStats {
...
@@ -562,6 +562,8 @@ struct _qemuMonitorMigrationStats {
unsigned
long
long
xbzrle_pages
;
unsigned
long
long
xbzrle_pages
;
unsigned
long
long
xbzrle_cache_miss
;
unsigned
long
long
xbzrle_cache_miss
;
unsigned
long
long
xbzrle_overflow
;
unsigned
long
long
xbzrle_overflow
;
int
cpu_throttle_percentage
;
};
};
int
qemuMonitorGetMigrationStats
(
qemuMonitorPtr
mon
,
int
qemuMonitorGetMigrationStats
(
qemuMonitorPtr
mon
,
...
...
src/qemu/qemu_monitor_json.c
浏览文件 @
d85c3a54
...
@@ -2673,6 +2673,9 @@ qemuMonitorJSONGetMigrationStatsReply(virJSONValuePtr reply,
...
@@ -2673,6 +2673,9 @@ qemuMonitorJSONGetMigrationStatsReply(virJSONValuePtr reply,
&
stats
->
setup_time
)
==
0
)
&
stats
->
setup_time
)
==
0
)
stats
->
setup_time_set
=
true
;
stats
->
setup_time_set
=
true
;
ignore_value
(
virJSONValueObjectGetNumberInt
(
ret
,
"cpu-throttle-percentage"
,
&
stats
->
cpu_throttle_percentage
));
switch
((
qemuMonitorMigrationStatus
)
stats
->
status
)
{
switch
((
qemuMonitorMigrationStatus
)
stats
->
status
)
{
case
QEMU_MONITOR_MIGRATION_STATUS_INACTIVE
:
case
QEMU_MONITOR_MIGRATION_STATUS_INACTIVE
:
case
QEMU_MONITOR_MIGRATION_STATUS_SETUP
:
case
QEMU_MONITOR_MIGRATION_STATUS_SETUP
:
...
...
tools/virsh-domain.c
浏览文件 @
d85c3a54
...
@@ -5759,6 +5759,7 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
...
@@ -5759,6 +5759,7 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
int
nparams
=
0
;
int
nparams
=
0
;
unsigned
long
long
value
;
unsigned
long
long
value
;
unsigned
int
flags
=
0
;
unsigned
int
flags
=
0
;
int
ivalue
;
int
rc
;
int
rc
;
if
(
!
(
dom
=
virshCommandOptDomain
(
ctl
,
cmd
,
NULL
)))
if
(
!
(
dom
=
virshCommandOptDomain
(
ctl
,
cmd
,
NULL
)))
...
@@ -5994,6 +5995,14 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
...
@@ -5994,6 +5995,14 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
vshPrint
(
ctl
,
"%-17s %-13llu
\n
"
,
_
(
"Compression overflows:"
),
value
);
vshPrint
(
ctl
,
"%-17s %-13llu
\n
"
,
_
(
"Compression overflows:"
),
value
);
}
}
if
((
rc
=
virTypedParamsGetInt
(
params
,
nparams
,
VIR_DOMAIN_JOB_AUTO_CONVERGE_THROTTLE
,
&
ivalue
))
<
0
)
{
goto
save_error
;
}
else
if
(
rc
)
{
vshPrint
(
ctl
,
"%-17s %-13d
\n
"
,
_
(
"Auto converge throttle:"
),
ivalue
);
}
ret
=
true
;
ret
=
true
;
cleanup:
cleanup:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录