Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
a9f528ab
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看板
提交
a9f528ab
编写于
3月 10, 2015
作者:
J
John Ferlan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Convert virDomainPinDefPtr->vcpuid to virDomainPinDefPtr->id
Since we're not specifically a vcpu related structure anymore...
上级
59ba7023
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
27 addition
and
28 deletion
+27
-28
src/conf/domain_conf.c
src/conf/domain_conf.c
+19
-20
src/conf/domain_conf.h
src/conf/domain_conf.h
+1
-1
src/libxl/libxl_domain.c
src/libxl/libxl_domain.c
+1
-1
src/libxl/libxl_driver.c
src/libxl/libxl_driver.c
+1
-1
src/qemu/qemu_cgroup.c
src/qemu/qemu_cgroup.c
+4
-4
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+1
-1
未找到文件。
src/conf/domain_conf.c
浏览文件 @
a9f528ab
...
...
@@ -2015,7 +2015,7 @@ virDomainVcpuPinDefCopy(virDomainPinDefPtr *src, int nvcpupin)
for (i = 0; i < nvcpupin; i++) {
if (VIR_ALLOC(ret[i]) < 0)
goto error;
ret[i]->
vcpuid = src[i]->vcpu
id;
ret[i]->
id = src[i]->
id;
if ((ret[i]->cpumask = virBitmapNewCopy(src[i]->cpumask)) == NULL)
goto error;
}
...
...
@@ -12796,7 +12796,7 @@ virDomainVcpuPinDefParseXML(xmlNodePtr node,
goto error;
}
def->
vcpu
id = vcpuid;
def->id = vcpuid;
}
if (iothreads && (tmp = virXPathString("string(./@iothread)", ctxt))) {
...
...
@@ -12823,8 +12823,7 @@ virDomainVcpuPinDefParseXML(xmlNodePtr node,
goto error;
}
/* Rather than creating our own structure we are reusing the vCPU */
def->vcpuid = iothreadid;
def->id = iothreadid;
}
if (!(tmp = virXMLPropString(node, "cpuset"))) {
...
...
@@ -13532,14 +13531,14 @@ virDomainDefParseXML(xmlDocPtr xml,
if (virDomainVcpuPinIsDuplicate(def->cputune.vcpupin,
def->cputune.nvcpupin,
vcpupin->
vcpu
id)) {
vcpupin->id)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("duplicate vcpupin for same vcpu"));
virDomainVcpuPinDefFree(vcpupin);
goto error;
}
if (vcpupin->
vcpu
id >= def->vcpus) {
if (vcpupin->id >= def->vcpus) {
/* To avoid the regression when daemon loading
* domain confs, we can't simply error out if
* <vcpupin> nodes greater than current vcpus,
...
...
@@ -13576,7 +13575,7 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
}
virBitmapCopy(vcpupin->cpumask, def->cpumask);
vcpupin->
vcpu
id = i;
vcpupin->id = i;
def->cputune.vcpupin[def->cputune.nvcpupin++] = vcpupin;
}
}
...
...
@@ -13624,7 +13623,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if (virDomainVcpuPinIsDuplicate(def->cputune.iothreadspin,
def->cputune.niothreadspin,
iothreadpin->
vcpu
id)) {
iothreadpin->id)) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("duplicate iothreadpin for same iothread"));
virDomainVcpuPinDefFree(iothreadpin);
...
...
@@ -16734,7 +16733,7 @@ virDomainDefAddImplicitControllers(virDomainDefPtr def)
return 0;
}
/* Check if vcpupin with same
vcpu
id already exists.
/* Check if vcpupin with same id already exists.
* Return 1 if exists, 0 if not. */
int
virDomainVcpuPinIsDuplicate(virDomainPinDefPtr *def,
...
...
@@ -16747,7 +16746,7 @@ virDomainVcpuPinIsDuplicate(virDomainPinDefPtr *def,
return 0;
for (i = 0; i < nvcpupin; i++) {
if (def[i]->
vcpu
id == vcpu)
if (def[i]->id == vcpu)
return 1;
}
...
...
@@ -16765,7 +16764,7 @@ virDomainVcpuPinFindByVcpu(virDomainPinDefPtr *def,
return NULL;
for (i = 0; i < nvcpupin; i++) {
if (def[i]->
vcpu
id == vcpu)
if (def[i]->id == vcpu)
return def[i];
}
...
...
@@ -16788,7 +16787,7 @@ virDomainVcpuPinAdd(virDomainPinDefPtr **vcpupin_list,
*nvcpupin,
vcpu);
if (vcpupin) {
vcpupin->
vcpu
id = vcpu;
vcpupin->id = vcpu;
virBitmapFree(vcpupin->cpumask);
vcpupin->cpumask = virBitmapNewData(cpumap, maplen);
if (!vcpupin->cpumask)
...
...
@@ -16802,7 +16801,7 @@ virDomainVcpuPinAdd(virDomainPinDefPtr **vcpupin_list,
if (VIR_ALLOC(vcpupin) < 0)
goto error;
vcpupin->
vcpu
id = vcpu;
vcpupin->id = vcpu;
vcpupin->cpumask = virBitmapNewData(cpumap, maplen);
if (!vcpupin->cpumask)
goto error;
...
...
@@ -16824,7 +16823,7 @@ virDomainVcpuPinDel(virDomainDefPtr def, int vcpu)
virDomainPinDefPtr *vcpupin_list = def->cputune.vcpupin;
for (n = 0; n < def->cputune.nvcpupin; n++) {
if (vcpupin_list[n]->
vcpu
id == vcpu) {
if (vcpupin_list[n]->id == vcpu) {
virBitmapFree(vcpupin_list[n]->cpumask);
VIR_FREE(vcpupin_list[n]);
VIR_DELETE_ELEMENT(def->cputune.vcpupin, n, def->cputune.nvcpupin);
...
...
@@ -16845,7 +16844,7 @@ virDomainEmulatorPinAdd(virDomainDefPtr def,
if (VIR_ALLOC(emulatorpin) < 0)
return -1;
emulatorpin->
vcpu
id = -1;
emulatorpin->id = -1;
emulatorpin->cpumask = virBitmapNewData(cpumap, maplen);
if (!emulatorpin->cpumask) {
virDomainVcpuPinDefFree(emulatorpin);
...
...
@@ -16894,7 +16893,7 @@ virDomainIOThreadsPinAdd(virDomainPinDefPtr **iothreadspin_list,
*niothreadspin,
iothread_id);
if (iothreadpin) {
iothreadpin->
vcpu
id = iothread_id;
iothreadpin->id = iothread_id;
virBitmapFree(iothreadpin->cpumask);
iothreadpin->cpumask = virBitmapNewData(cpumap, maplen);
if (!iothreadpin->cpumask)
...
...
@@ -16908,7 +16907,7 @@ virDomainIOThreadsPinAdd(virDomainPinDefPtr **iothreadspin_list,
if (VIR_ALLOC(iothreadpin) < 0)
goto error;
iothreadpin->
vcpu
id = iothread_id;
iothreadpin->id = iothread_id;
iothreadpin->cpumask = virBitmapNewData(cpumap, maplen);
if (!iothreadpin->cpumask)
goto error;
...
...
@@ -16931,7 +16930,7 @@ virDomainIOThreadsPinDel(virDomainDefPtr def,
virDomainPinDefPtr *iothreadspin_list = def->cputune.iothreadspin;
for (i = 0; i < def->cputune.niothreadspin; i++) {
if (iothreadspin_list[i]->
vcpu
id == iothread_id) {
if (iothreadspin_list[i]->id == iothread_id) {
virBitmapFree(iothreadspin_list[i]->cpumask);
VIR_DELETE_ELEMENT(def->cputune.iothreadspin, i,
def->cputune.niothreadspin);
...
...
@@ -20103,7 +20102,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
continue;
virBufferAsprintf(buf, "<vcpupin vcpu='%u' ",
def->cputune.vcpupin[i]->
vcpu
id);
def->cputune.vcpupin[i]->id);
if (!(cpumask = virBitmapFormat(def->cputune.vcpupin[i]->cpumask)))
goto error;
...
...
@@ -20130,7 +20129,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
continue;
virBufferAsprintf(buf, "<iothreadpin iothread='%u' ",
def->cputune.iothreadspin[i]->
vcpu
id);
def->cputune.iothreadspin[i]->id);
if (!(cpumask = virBitmapFormat(def->cputune.iothreadspin[i]->cpumask)))
goto error;
...
...
src/conf/domain_conf.h
浏览文件 @
a9f528ab
...
...
@@ -1903,7 +1903,7 @@ struct _virDomainClockDef {
typedef
struct
_virDomainPinDef
virDomainPinDef
;
typedef
virDomainPinDef
*
virDomainPinDefPtr
;
struct
_virDomainPinDef
{
int
vcpu
id
;
int
id
;
virBitmapPtr
cpumask
;
};
...
...
src/libxl/libxl_domain.c
浏览文件 @
a9f528ab
...
...
@@ -1084,7 +1084,7 @@ libxlDomainSetVcpuAffinities(libxlDriverPrivatePtr driver, virDomainObjPtr vm)
cpumaplen
=
VIR_CPU_MAPLEN
(
VIR_NODEINFO_MAXCPUS
(
nodeinfo
));
for
(
vcpu
=
0
;
vcpu
<
def
->
cputune
.
nvcpupin
;
++
vcpu
)
{
if
(
vcpu
!=
def
->
cputune
.
vcpupin
[
vcpu
]
->
vcpu
id
)
if
(
vcpu
!=
def
->
cputune
.
vcpupin
[
vcpu
]
->
id
)
continue
;
if
(
VIR_ALLOC_N
(
cpumap
,
cpumaplen
)
<
0
)
...
...
src/libxl/libxl_driver.c
浏览文件 @
a9f528ab
...
...
@@ -2095,7 +2095,7 @@ libxlDomainGetVcpuPinInfo(virDomainPtr dom, int ncpumaps,
/* if vcpupin setting exists, there may be unused pcpus */
for
(
n
=
0
;
n
<
targetDef
->
cputune
.
nvcpupin
;
n
++
)
{
vcpupin_list
=
targetDef
->
cputune
.
vcpupin
;
vcpu
=
vcpupin_list
[
n
]
->
vcpu
id
;
vcpu
=
vcpupin_list
[
n
]
->
id
;
cpumask
=
vcpupin_list
[
n
]
->
cpumask
;
cpumap
=
VIR_GET_CPUMAP
(
cpumaps
,
maplen
,
vcpu
);
for
(
pcpu
=
0
;
pcpu
<
maxcpu
;
pcpu
++
)
{
...
...
src/qemu/qemu_cgroup.c
浏览文件 @
a9f528ab
...
...
@@ -948,7 +948,7 @@ qemuSetupCgroupVcpuPin(virCgroupPtr cgroup,
size_t
i
;
for
(
i
=
0
;
i
<
nvcpupin
;
i
++
)
{
if
(
vcpuid
==
vcpupin
[
i
]
->
vcpu
id
)
if
(
vcpuid
==
vcpupin
[
i
]
->
id
)
return
qemuSetupCgroupEmulatorPin
(
cgroup
,
vcpupin
[
i
]
->
cpumask
);
}
...
...
@@ -964,7 +964,7 @@ qemuSetupCgroupIOThreadsPin(virCgroupPtr cgroup,
size_t
i
;
for
(
i
=
0
;
i
<
niothreadspin
;
i
++
)
{
if
(
iothreadid
==
iothreadspin
[
i
]
->
vcpu
id
)
if
(
iothreadid
==
iothreadspin
[
i
]
->
id
)
return
qemuSetupCgroupEmulatorPin
(
cgroup
,
iothreadspin
[
i
]
->
cpumask
);
}
...
...
@@ -1059,7 +1059,7 @@ qemuSetupCgroupForVcpu(virDomainObjPtr vm)
/* find the right CPU to pin, otherwise
* qemuSetupCgroupVcpuPin will fail. */
for
(
j
=
0
;
j
<
def
->
cputune
.
nvcpupin
;
j
++
)
{
if
(
def
->
cputune
.
vcpupin
[
j
]
->
vcpu
id
!=
i
)
if
(
def
->
cputune
.
vcpupin
[
j
]
->
id
!=
i
)
continue
;
if
(
qemuSetupCgroupVcpuPin
(
cgroup_vcpu
,
...
...
@@ -1236,7 +1236,7 @@ qemuSetupCgroupForIOThreads(virDomainObjPtr vm)
* qemuSetupCgroupIOThreadsPin will fail. */
for
(
j
=
0
;
j
<
def
->
cputune
.
niothreadspin
;
j
++
)
{
/* IOThreads are numbered/named 1..n */
if
(
def
->
cputune
.
iothreadspin
[
j
]
->
vcpu
id
!=
i
+
1
)
if
(
def
->
cputune
.
iothreadspin
[
j
]
->
id
!=
i
+
1
)
continue
;
if
(
qemuSetupCgroupIOThreadsPin
(
cgroup_iothread
,
...
...
src/qemu/qemu_driver.c
浏览文件 @
a9f528ab
...
...
@@ -4751,7 +4751,7 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
vcpupin->cpumask = virBitmapNew(VIR_DOMAIN_CPUMASK_LEN);
virBitmapCopy(vcpupin->cpumask, vm->def->cpumask);
vcpupin->
vcpu
id = i;
vcpupin->id = i;
if (VIR_APPEND_ELEMENT_COPY(vm->def->cputune.vcpupin,
vm->def->cputune.nvcpupin, vcpupin) < 0) {
virBitmapFree(vcpupin->cpumask);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录