Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
92ff72b5
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看板
提交
92ff72b5
编写于
4月 03, 2009
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Misc NUMA related fixes
上级
e4073623
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
10 deletion
+32
-10
ChangeLog
ChangeLog
+10
-0
qemud/remote.c
qemud/remote.c
+7
-5
src/qemu_driver.c
src/qemu_driver.c
+11
-3
src/virsh.c
src/virsh.c
+4
-2
未找到文件。
ChangeLog
浏览文件 @
92ff72b5
Fri Apr 3 13:41:00 BST 2009 Daniel P. Berrange <berrange@redhat.com>
Misc NUMA memory fixes
* qemud/remote.c: Fix check of error status in the helper
remoteDispatchNodeGetCellsFreeMemory
* src/qemu_driver.c: Report error if requested start cell
is out of range. Fix return value if NUMA is not available
* src/virsh.c: Convert memory to KB for freecell command.
Check return value of virNodeGetFreeMemory
Fri Apr 3 11:55:00 BST 2009 Daniel P. Berrange <berrange@redhat.com>
Support PCI passthrough in Xen driver
...
...
qemud/remote.c
浏览文件 @
92ff72b5
...
...
@@ -662,6 +662,7 @@ remoteDispatchNodeGetCellsFreeMemory (struct qemud_server *server ATTRIBUTE_UNUS
remote_node_get_cells_free_memory_args
*
args
,
remote_node_get_cells_free_memory_ret
*
ret
)
{
int
err
;
if
(
args
->
maxCells
>
REMOTE_NODE_MAX_CELLS
)
{
remoteDispatchFormatError
(
rerr
,
...
...
@@ -675,15 +676,16 @@ remoteDispatchNodeGetCellsFreeMemory (struct qemud_server *server ATTRIBUTE_UNUS
return
-
1
;
}
ret
->
freeMems
.
freeMems_len
=
virNodeGetCellsFreeMemory
(
conn
,
(
unsigned
long
long
*
)
ret
->
freeMems
.
freeMems_val
,
args
->
startCell
,
args
->
maxCells
);
if
(
ret
->
freeMems
.
freeMems_len
=
=
0
)
{
err
=
virNodeGetCellsFreeMemory
(
conn
,
(
unsigned
long
long
*
)
ret
->
freeMems
.
freeMems_val
,
args
->
startCell
,
args
->
maxCells
);
if
(
err
<
=
0
)
{
VIR_FREE
(
ret
->
freeMems
.
freeMems_val
);
remoteDispatchConnError
(
rerr
,
conn
);
return
-
1
;
}
ret
->
freeMems
.
freeMems_len
=
err
;
return
0
;
}
...
...
src/qemu_driver.c
浏览文件 @
92ff72b5
...
...
@@ -1878,15 +1878,23 @@ qemudNodeGetCellsFreeMemory(virConnectPtr conn,
{
int
n
,
lastCell
,
numCells
;
int
ret
=
-
1
;
int
maxCell
;
if
(
numa_available
()
<
0
)
{
qemudReportError
(
conn
,
NULL
,
NULL
,
VIR_ERR_NO_SUPPORT
,
"%s"
,
_
(
"NUMA not supported on this host"
));
goto
cleanup
;
}
maxCell
=
numa_max_node
();
if
(
startCell
>
maxCell
)
{
qemudReportError
(
conn
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
_
(
"start cell %d out of range (0-%d)"
),
startCell
,
maxCell
);
goto
cleanup
;
}
lastCell
=
startCell
+
maxCells
-
1
;
if
(
lastCell
>
numa_max_node
()
)
lastCell
=
numa_max_node
()
;
if
(
lastCell
>
maxCell
)
lastCell
=
maxCell
;
for
(
numCells
=
0
,
n
=
startCell
;
n
<=
lastCell
;
n
++
)
{
long
long
mem
;
...
...
@@ -1906,7 +1914,7 @@ cleanup:
static
unsigned
long
long
qemudNodeGetFreeMemory
(
virConnectPtr
conn
)
{
unsigned
long
long
freeMem
=
-
1
;
unsigned
long
long
freeMem
=
0
;
int
n
;
if
(
numa_available
()
<
0
)
{
...
...
src/virsh.c
浏览文件 @
92ff72b5
...
...
@@ -1654,6 +1654,8 @@ cmdFreecell(vshControl *ctl, const vshCmd *cmd)
cell
=
vshCommandOptInt
(
cmd
,
"cellno"
,
&
cell_given
);
if
(
!
cell_given
)
{
memory
=
virNodeGetFreeMemory
(
ctl
->
conn
);
if
(
memory
==
0
)
return
FALSE
;
}
else
{
ret
=
virNodeGetCellsFreeMemory
(
ctl
->
conn
,
&
memory
,
cell
,
1
);
if
(
ret
!=
1
)
...
...
@@ -1661,9 +1663,9 @@ cmdFreecell(vshControl *ctl, const vshCmd *cmd)
}
if
(
cell
==
-
1
)
vshPrint
(
ctl
,
"%s: %llu kB
\n
"
,
_
(
"Total"
),
memory
);
vshPrint
(
ctl
,
"%s: %llu kB
\n
"
,
_
(
"Total"
),
(
memory
/
1024
)
);
else
vshPrint
(
ctl
,
"%d: %llu kB
\n
"
,
cell
,
memory
);
vshPrint
(
ctl
,
"%d: %llu kB
\n
"
,
cell
,
(
memory
/
1024
)
);
return
TRUE
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录