Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
39f775cc
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,体验更适合开发者的 AI 搜索 >>
提交
39f775cc
编写于
6月 16, 2009
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add new 'availheap' sysctl variant for ABI changes in Xen
上级
c4a6bc49
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
2 deletion
+23
-2
ChangeLog
ChangeLog
+5
-0
src/xen_internal.c
src/xen_internal.c
+18
-2
未找到文件。
ChangeLog
浏览文件 @
39f775cc
Tue Jun 16 10:30:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
* src/xen_internal.c: Add new variant of availheap sysctl
for ABI changes in Xen
Mon Jun 15 18:15:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
Fix build on non-Linux targets
...
...
src/xen_internal.c
浏览文件 @
39f775cc
...
...
@@ -241,6 +241,15 @@ struct xen_v2s4_availheap {
typedef
struct
xen_v2s4_availheap
xen_v2s4_availheap
;
struct
xen_v2s5_availheap
{
uint32_t
min_bitwidth
;
/* Smallest address width (zero if don't care). */
uint32_t
max_bitwidth
;
/* Largest address width (zero if don't care). */
int32_t
node
;
/* NUMA node (-1 for sum across all nodes). */
uint64_t
avail_bytes
ALIGN_64
;
/* Bytes available in the specified region. */
};
typedef
struct
xen_v2s5_availheap
xen_v2s5_availheap
;
#define XEN_GETDOMAININFOLIST_ALLOC(domlist, size) \
(hypervisor_version < 2 ? \
...
...
@@ -650,6 +659,7 @@ struct xen_op_v2_sys {
xen_v2s3_getdomaininfolistop
getdomaininfolists3
;
xen_v2_getschedulerid
getschedulerid
;
xen_v2s4_availheap
availheap
;
xen_v2s5_availheap
availheap5
;
uint8_t
padding
[
128
];
}
u
;
};
...
...
@@ -3125,12 +3135,18 @@ xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn, unsigned long long *free
op_sys
.
cmd
=
XEN_V2_OP_GETAVAILHEAP
;
for
(
i
=
startCell
,
j
=
0
;(
i
<
priv
->
nbNodeCells
)
&&
(
j
<
maxCells
);
i
++
,
j
++
)
{
op_sys
.
u
.
availheap
.
node
=
i
;
if
(
sys_interface_version
>=
5
)
op_sys
.
u
.
availheap5
.
node
=
i
;
else
op_sys
.
u
.
availheap
.
node
=
i
;
ret
=
xenHypervisorDoV2Sys
(
priv
->
handle
,
&
op_sys
);
if
(
ret
<
0
)
{
return
(
-
1
);
}
freeMems
[
j
]
=
op_sys
.
u
.
availheap
.
avail_bytes
;
if
(
sys_interface_version
>=
5
)
freeMems
[
j
]
=
op_sys
.
u
.
availheap5
.
avail_bytes
;
else
freeMems
[
j
]
=
op_sys
.
u
.
availheap
.
avail_bytes
;
}
return
(
j
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录