Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
f56c773b
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看板
提交
f56c773b
编写于
12月 13, 2012
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Merge processinfo.{c,h} into virprocess.{c,h}
上级
3ddddd98
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
209 addition
and
272 deletion
+209
-272
po/POTFILES.in
po/POTFILES.in
+0
-1
src/Makefile.am
src/Makefile.am
+0
-1
src/libvirt_private.syms
src/libvirt_private.syms
+2
-5
src/lxc/lxc_controller.c
src/lxc/lxc_controller.c
+1
-2
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+7
-7
src/qemu/qemu_process.c
src/qemu/qemu_process.c
+4
-5
src/util/processinfo.c
src/util/processinfo.c
+0
-217
src/util/processinfo.h
src/util/processinfo.h
+0
-34
src/util/virprocess.c
src/util/virprocess.c
+189
-0
src/util/virprocess.h
src/util/virprocess.h
+6
-0
未找到文件。
po/POTFILES.in
浏览文件 @
f56c773b
...
...
@@ -139,7 +139,6 @@ src/test/test_driver.c
src/uml/uml_conf.c
src/uml/uml_driver.c
src/util/iohelper.c
src/util/processinfo.c
src/util/sexpr.c
src/util/stats_linux.c
src/util/storage_file.c
...
...
src/Makefile.am
浏览文件 @
f56c773b
...
...
@@ -53,7 +53,6 @@ augeastest_DATA =
# These files are not related to driver APIs. Simply generic
# helper APIs for various purposes
UTIL_SOURCES
=
\
util/processinfo.c util/processinfo.h
\
util/sexpr.c util/sexpr.h
\
util/stats_linux.c util/stats_linux.h
\
util/storage_file.c util/storage_file.h
\
...
...
src/libvirt_private.syms
浏览文件 @
f56c773b
...
...
@@ -1028,11 +1028,6 @@ pciResetDevice;
pciWaitForDeviceCleanup;
# processinfo.h
virProcessInfoGetAffinity;
virProcessInfoSetAffinity;
# secret_conf.h
virSecretDefFormat;
virSecretDefFree;
...
...
@@ -1794,8 +1789,10 @@ virPidFileWritePath;
# virprocess.h
virProcessAbort;
virProcessGetAffinity;
virProcessKill;
virProcessKillPainfully;
virProcessSetAffinity;
virProcessTranslateStatus;
virProcessWait;
...
...
src/lxc/lxc_controller.c
浏览文件 @
f56c773b
...
...
@@ -67,7 +67,6 @@
#include "virfile.h"
#include "virpidfile.h"
#include "vircommand.h"
#include "processinfo.h"
#include "nodeinfo.h"
#include "virrandom.h"
#include "virprocess.h"
...
...
@@ -541,7 +540,7 @@ static int virLXCControllerSetupCpuAffinity(virLXCControllerPtr ctrl)
* so use '0' to indicate our own process ID. No threads are
* running at this point
*/
if
(
virProcess
Info
SetAffinity
(
0
/* Self */
,
cpumapToSet
)
<
0
)
{
if
(
virProcessSetAffinity
(
0
/* Self */
,
cpumapToSet
)
<
0
)
{
virBitmapFree
(
cpumap
);
return
-
1
;
}
...
...
src/qemu/qemu_driver.c
浏览文件 @
f56c773b
...
...
@@ -73,7 +73,7 @@
#include "node_device_conf.h"
#include "virpci.h"
#include "virusb.h"
#include "
processinfo
.h"
#include "
virprocess
.h"
#include "libvirt_internal.h"
#include "xml.h"
#include "cpu/cpu.h"
...
...
@@ -3880,8 +3880,8 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
goto
cleanup
;
}
}
else
{
if
(
virProcess
Info
SetAffinity
(
cpupids
[
i
],
vcpupin
->
cpumask
)
<
0
)
{
if
(
virProcessSetAffinity
(
cpupids
[
i
],
vcpupin
->
cpumask
)
<
0
)
{
virReportError
(
VIR_ERR_SYSTEM_ERROR
,
_
(
"failed to set cpu affinity for vcpu %d"
),
i
);
...
...
@@ -4154,7 +4154,7 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
goto
cleanup
;
}
}
else
{
if
(
virProcess
Info
SetAffinity
(
priv
->
vcpupids
[
vcpu
],
pcpumap
)
<
0
)
{
if
(
virProcessSetAffinity
(
priv
->
vcpupids
[
vcpu
],
pcpumap
)
<
0
)
{
virReportError
(
VIR_ERR_SYSTEM_ERROR
,
_
(
"failed to set cpu affinity for vcpu %d"
),
vcpu
);
...
...
@@ -4422,7 +4422,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
}
}
}
else
{
if
(
virProcess
Info
SetAffinity
(
pid
,
pcpumap
)
<
0
)
{
if
(
virProcessSetAffinity
(
pid
,
pcpumap
)
<
0
)
{
virReportError
(
VIR_ERR_SYSTEM_ERROR
,
"%s"
,
_
(
"failed to set cpu affinity for "
"emulator threads"
));
...
...
@@ -4640,8 +4640,8 @@ qemuDomainGetVcpus(virDomainPtr dom,
unsigned
char
*
tmpmap
=
NULL
;
int
tmpmapLen
=
0
;
if
(
virProcess
Info
GetAffinity
(
priv
->
vcpupids
[
v
],
&
map
,
maxcpu
)
<
0
)
if
(
virProcessGetAffinity
(
priv
->
vcpupids
[
v
],
&
map
,
maxcpu
)
<
0
)
goto
cleanup
;
virBitmapToData
(
map
,
&
tmpmap
,
&
tmpmapLen
);
if
(
tmpmapLen
>
maplen
)
...
...
src/qemu/qemu_process.c
浏览文件 @
f56c773b
...
...
@@ -60,7 +60,6 @@
#include "util.h"
#include "c-ctype.h"
#include "nodeinfo.h"
#include "processinfo.h"
#include "domain_audit.h"
#include "domain_nwfilter.h"
#include "locking/domain_lock.h"
...
...
@@ -1980,7 +1979,7 @@ qemuProcessInitCpuAffinity(virQEMUDriverPtr driver,
* so use '0' to indicate our own process ID. No threads are
* running at this point
*/
if
(
virProcess
Info
SetAffinity
(
0
/* Self */
,
cpumapToSet
)
<
0
)
if
(
virProcessSetAffinity
(
0
/* Self */
,
cpumapToSet
)
<
0
)
goto
cleanup
;
ret
=
0
;
...
...
@@ -2045,8 +2044,8 @@ qemuProcessSetVcpuAffinities(virConnectPtr conn ATTRIBUTE_UNUSED,
for
(
n
=
0
;
n
<
def
->
cputune
.
nvcpupin
;
n
++
)
{
vcpu
=
def
->
cputune
.
vcpupin
[
n
]
->
vcpuid
;
if
(
virProcess
Info
SetAffinity
(
priv
->
vcpupids
[
vcpu
],
def
->
cputune
.
vcpupin
[
n
]
->
cpumask
)
<
0
)
{
if
(
virProcessSetAffinity
(
priv
->
vcpupids
[
vcpu
],
def
->
cputune
.
vcpupin
[
n
]
->
cpumask
)
<
0
)
{
goto
cleanup
;
}
}
...
...
@@ -2072,7 +2071,7 @@ qemuProcessSetEmulatorAffinities(virConnectPtr conn ATTRIBUTE_UNUSED,
else
return
0
;
ret
=
virProcess
Info
SetAffinity
(
vm
->
pid
,
cpumask
);
ret
=
virProcessSetAffinity
(
vm
->
pid
,
cpumask
);
return
ret
;
}
...
...
src/util/processinfo.c
已删除
100644 → 0
浏览文件 @
3ddddd98
/*
* Copyright (C) 2009-2010, 2012 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Authors:
* Daniel P. Berrange <berrange@redhat.com>
*/
#include <config.h>
#include <stdlib.h>
#include <sched.h>
#include "processinfo.h"
#include "virterror_internal.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#if HAVE_SCHED_GETAFFINITY
int
virProcessInfoSetAffinity
(
pid_t
pid
,
virBitmapPtr
map
)
{
int
i
;
bool
set
=
false
;
# ifdef CPU_ALLOC
/* New method dynamically allocates cpu mask, allowing unlimted cpus */
int
numcpus
=
1024
;
size_t
masklen
;
cpu_set_t
*
mask
;
/* Not only may the statically allocated cpu_set_t be too small,
* but there is no way to ask the kernel what size is large enough.
* So you have no option but to pick a size, try, catch EINVAL,
* enlarge, and re-try.
*
* http://lkml.org/lkml/2009/7/28/620
*/
realloc:
masklen
=
CPU_ALLOC_SIZE
(
numcpus
);
mask
=
CPU_ALLOC
(
numcpus
);
if
(
!
mask
)
{
virReportOOMError
();
return
-
1
;
}
CPU_ZERO_S
(
masklen
,
mask
);
for
(
i
=
0
;
i
<
virBitmapSize
(
map
);
i
++
)
{
if
(
virBitmapGetBit
(
map
,
i
,
&
set
)
<
0
)
return
-
1
;
if
(
set
)
CPU_SET_S
(
i
,
masklen
,
mask
);
}
if
(
sched_setaffinity
(
pid
,
masklen
,
mask
)
<
0
)
{
CPU_FREE
(
mask
);
if
(
errno
==
EINVAL
&&
numcpus
<
(
1024
<<
8
))
{
/* 262144 cpus ought to be enough for anyone */
numcpus
=
numcpus
<<
2
;
goto
realloc
;
}
virReportSystemError
(
errno
,
_
(
"cannot set CPU affinity on process %d"
),
pid
);
return
-
1
;
}
CPU_FREE
(
mask
);
# else
/* Legacy method uses a fixed size cpu mask, only allows up to 1024 cpus */
cpu_set_t
mask
;
CPU_ZERO
(
&
mask
);
for
(
i
=
0
;
i
<
virBitmapSize
(
map
);
i
++
)
{
if
(
virBitmapGetBit
(
map
,
i
,
&
set
)
<
0
)
return
-
1
;
if
(
set
)
CPU_SET
(
i
,
&
mask
);
}
if
(
sched_setaffinity
(
pid
,
sizeof
(
mask
),
&
mask
)
<
0
)
{
virReportSystemError
(
errno
,
_
(
"cannot set CPU affinity on process %d"
),
pid
);
return
-
1
;
}
# endif
return
0
;
}
int
virProcessInfoGetAffinity
(
pid_t
pid
,
virBitmapPtr
*
map
,
int
maxcpu
)
{
int
i
;
# ifdef CPU_ALLOC
/* New method dynamically allocates cpu mask, allowing unlimted cpus */
int
numcpus
=
1024
;
size_t
masklen
;
cpu_set_t
*
mask
;
/* Not only may the statically allocated cpu_set_t be too small,
* but there is no way to ask the kernel what size is large enough.
* So you have no option but to pick a size, try, catch EINVAL,
* enlarge, and re-try.
*
* http://lkml.org/lkml/2009/7/28/620
*/
realloc:
masklen
=
CPU_ALLOC_SIZE
(
numcpus
);
mask
=
CPU_ALLOC
(
numcpus
);
if
(
!
mask
)
{
virReportOOMError
();
return
-
1
;
}
CPU_ZERO_S
(
masklen
,
mask
);
if
(
sched_getaffinity
(
pid
,
masklen
,
mask
)
<
0
)
{
CPU_FREE
(
mask
);
if
(
errno
==
EINVAL
&&
numcpus
<
(
1024
<<
8
))
{
/* 262144 cpus ought to be enough for anyone */
numcpus
=
numcpus
<<
2
;
goto
realloc
;
}
virReportSystemError
(
errno
,
_
(
"cannot get CPU affinity of process %d"
),
pid
);
return
-
1
;
}
*
map
=
virBitmapNew
(
maxcpu
);
if
(
!*
map
)
{
virReportOOMError
();
return
-
1
;
}
for
(
i
=
0
;
i
<
maxcpu
;
i
++
)
if
(
CPU_ISSET_S
(
i
,
masklen
,
mask
))
ignore_value
(
virBitmapSetBit
(
*
map
,
i
));
CPU_FREE
(
mask
);
# else
/* Legacy method uses a fixed size cpu mask, only allows up to 1024 cpus */
cpu_set_t
mask
;
CPU_ZERO
(
&
mask
);
if
(
sched_getaffinity
(
pid
,
sizeof
(
mask
),
&
mask
)
<
0
)
{
virReportSystemError
(
errno
,
_
(
"cannot get CPU affinity of process %d"
),
pid
);
return
-
1
;
}
for
(
i
=
0
;
i
<
maxcpu
;
i
++
)
if
(
CPU_ISSET
(
i
,
&
mask
))
ignore_value
(
virBitmapSetBit
(
*
map
,
i
));
# endif
return
0
;
}
#elif defined(__FreeBSD__)
int
virProcessInfoSetAffinity
(
pid_t
pid
ATTRIBUTE_UNUSED
,
virBitmapPtr
map
)
{
if
(
!
virBitmapIsAllSet
(
map
))
{
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"setting process affinity isn't supported "
"on FreeBSD yet"
));
return
-
1
;
}
return
0
;
}
int
virProcessInfoGetAffinity
(
pid_t
pid
ATTRIBUTE_UNUSED
,
virBitmapPtr
*
map
,
int
maxcpu
)
{
if
(
!
(
*
map
=
virBitmapNew
(
maxcpu
)))
{
virReportOOMError
();
return
-
1
;
}
virBitmapSetAll
(
*
map
);
return
0
;
}
#else
/* HAVE_SCHED_GETAFFINITY */
int
virProcessInfoSetAffinity
(
pid_t
pid
ATTRIBUTE_UNUSED
,
virBitmapPtr
map
ATTRIBUTE_UNUSED
)
{
virReportSystemError
(
ENOSYS
,
"%s"
,
_
(
"Process CPU affinity is not supported on this platform"
));
return
-
1
;
}
int
virProcessInfoGetAffinity
(
pid_t
pid
ATTRIBUTE_UNUSED
,
virBitmapPtr
*
map
ATTRIBUTE_UNUSED
,
int
maxcpu
ATTRIBUTE_UNUSED
)
{
virReportSystemError
(
ENOSYS
,
"%s"
,
_
(
"Process CPU affinity is not supported on this platform"
));
return
-
1
;
}
#endif
/* HAVE_SCHED_GETAFFINITY */
src/util/processinfo.h
已删除
100644 → 0
浏览文件 @
3ddddd98
/*
* Copyright (C) 2009 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Authors:
* Daniel P. Berrange <berrange@redhat.com>
*/
#ifndef __VIR_PROCESSINFO_H__
# define __VIR_PROCESSINFO_H__
# include "internal.h"
# include "virbitmap.h"
int
virProcessInfoSetAffinity
(
pid_t
pid
,
virBitmapPtr
map
);
int
virProcessInfoGetAffinity
(
pid_t
pid
,
virBitmapPtr
*
map
,
int
maxcpu
);
#endif
/* __VIR_PROCESSINFO_H__ */
src/util/virprocess.c
浏览文件 @
f56c773b
...
...
@@ -25,6 +25,7 @@
#include <signal.h>
#include <errno.h>
#include <sys/wait.h>
#include <sched.h>
#include "virprocess.h"
#include "virterror_internal.h"
...
...
@@ -300,3 +301,191 @@ virProcessKillPainfully(pid_t pid, bool force)
cleanup:
return
ret
;
}
#if HAVE_SCHED_GETAFFINITY
int
virProcessSetAffinity
(
pid_t
pid
,
virBitmapPtr
map
)
{
int
i
;
bool
set
=
false
;
# ifdef CPU_ALLOC
/* New method dynamically allocates cpu mask, allowing unlimted cpus */
int
numcpus
=
1024
;
size_t
masklen
;
cpu_set_t
*
mask
;
/* Not only may the statically allocated cpu_set_t be too small,
* but there is no way to ask the kernel what size is large enough.
* So you have no option but to pick a size, try, catch EINVAL,
* enlarge, and re-try.
*
* http://lkml.org/lkml/2009/7/28/620
*/
realloc:
masklen
=
CPU_ALLOC_SIZE
(
numcpus
);
mask
=
CPU_ALLOC
(
numcpus
);
if
(
!
mask
)
{
virReportOOMError
();
return
-
1
;
}
CPU_ZERO_S
(
masklen
,
mask
);
for
(
i
=
0
;
i
<
virBitmapSize
(
map
);
i
++
)
{
if
(
virBitmapGetBit
(
map
,
i
,
&
set
)
<
0
)
return
-
1
;
if
(
set
)
CPU_SET_S
(
i
,
masklen
,
mask
);
}
if
(
sched_setaffinity
(
pid
,
masklen
,
mask
)
<
0
)
{
CPU_FREE
(
mask
);
if
(
errno
==
EINVAL
&&
numcpus
<
(
1024
<<
8
))
{
/* 262144 cpus ought to be enough for anyone */
numcpus
=
numcpus
<<
2
;
goto
realloc
;
}
virReportSystemError
(
errno
,
_
(
"cannot set CPU affinity on process %d"
),
pid
);
return
-
1
;
}
CPU_FREE
(
mask
);
# else
/* Legacy method uses a fixed size cpu mask, only allows up to 1024 cpus */
cpu_set_t
mask
;
CPU_ZERO
(
&
mask
);
for
(
i
=
0
;
i
<
virBitmapSize
(
map
);
i
++
)
{
if
(
virBitmapGetBit
(
map
,
i
,
&
set
)
<
0
)
return
-
1
;
if
(
set
)
CPU_SET
(
i
,
&
mask
);
}
if
(
sched_setaffinity
(
pid
,
sizeof
(
mask
),
&
mask
)
<
0
)
{
virReportSystemError
(
errno
,
_
(
"cannot set CPU affinity on process %d"
),
pid
);
return
-
1
;
}
# endif
return
0
;
}
int
virProcessGetAffinity
(
pid_t
pid
,
virBitmapPtr
*
map
,
int
maxcpu
)
{
int
i
;
# ifdef CPU_ALLOC
/* New method dynamically allocates cpu mask, allowing unlimted cpus */
int
numcpus
=
1024
;
size_t
masklen
;
cpu_set_t
*
mask
;
/* Not only may the statically allocated cpu_set_t be too small,
* but there is no way to ask the kernel what size is large enough.
* So you have no option but to pick a size, try, catch EINVAL,
* enlarge, and re-try.
*
* http://lkml.org/lkml/2009/7/28/620
*/
realloc:
masklen
=
CPU_ALLOC_SIZE
(
numcpus
);
mask
=
CPU_ALLOC
(
numcpus
);
if
(
!
mask
)
{
virReportOOMError
();
return
-
1
;
}
CPU_ZERO_S
(
masklen
,
mask
);
if
(
sched_getaffinity
(
pid
,
masklen
,
mask
)
<
0
)
{
CPU_FREE
(
mask
);
if
(
errno
==
EINVAL
&&
numcpus
<
(
1024
<<
8
))
{
/* 262144 cpus ought to be enough for anyone */
numcpus
=
numcpus
<<
2
;
goto
realloc
;
}
virReportSystemError
(
errno
,
_
(
"cannot get CPU affinity of process %d"
),
pid
);
return
-
1
;
}
*
map
=
virBitmapNew
(
maxcpu
);
if
(
!*
map
)
{
virReportOOMError
();
return
-
1
;
}
for
(
i
=
0
;
i
<
maxcpu
;
i
++
)
if
(
CPU_ISSET_S
(
i
,
masklen
,
mask
))
ignore_value
(
virBitmapSetBit
(
*
map
,
i
));
CPU_FREE
(
mask
);
# else
/* Legacy method uses a fixed size cpu mask, only allows up to 1024 cpus */
cpu_set_t
mask
;
CPU_ZERO
(
&
mask
);
if
(
sched_getaffinity
(
pid
,
sizeof
(
mask
),
&
mask
)
<
0
)
{
virReportSystemError
(
errno
,
_
(
"cannot get CPU affinity of process %d"
),
pid
);
return
-
1
;
}
for
(
i
=
0
;
i
<
maxcpu
;
i
++
)
if
(
CPU_ISSET
(
i
,
&
mask
))
ignore_value
(
virBitmapSetBit
(
*
map
,
i
));
# endif
return
0
;
}
#elif defined(__FreeBSD__)
int
virProcessSetAffinity
(
pid_t
pid
ATTRIBUTE_UNUSED
,
virBitmapPtr
map
)
{
if
(
!
virBitmapIsAllSet
(
map
))
{
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"setting process affinity isn't supported "
"on FreeBSD yet"
));
return
-
1
;
}
return
0
;
}
int
virProcessGetAffinity
(
pid_t
pid
ATTRIBUTE_UNUSED
,
virBitmapPtr
*
map
,
int
maxcpu
)
{
if
(
!
(
*
map
=
virBitmapNew
(
maxcpu
)))
{
virReportOOMError
();
return
-
1
;
}
virBitmapSetAll
(
*
map
);
return
0
;
}
#else
/* HAVE_SCHED_GETAFFINITY */
int
virProcessSetAffinity
(
pid_t
pid
ATTRIBUTE_UNUSED
,
virBitmapPtr
map
ATTRIBUTE_UNUSED
)
{
virReportSystemError
(
ENOSYS
,
"%s"
,
_
(
"Process CPU affinity is not supported on this platform"
));
return
-
1
;
}
int
virProcessGetAffinity
(
pid_t
pid
ATTRIBUTE_UNUSED
,
virBitmapPtr
*
map
ATTRIBUTE_UNUSED
,
int
maxcpu
ATTRIBUTE_UNUSED
)
{
virReportSystemError
(
ENOSYS
,
"%s"
,
_
(
"Process CPU affinity is not supported on this platform"
));
return
-
1
;
}
#endif
/* HAVE_SCHED_GETAFFINITY */
src/util/virprocess.h
浏览文件 @
f56c773b
...
...
@@ -25,6 +25,7 @@
# include <sys/types.h>
# include "internal.h"
# include "virbitmap.h"
char
*
virProcessTranslateStatus
(
int
status
);
...
...
@@ -40,5 +41,10 @@ int virProcessKill(pid_t pid, int sig);
int
virProcessKillPainfully
(
pid_t
pid
,
bool
force
);
int
virProcessSetAffinity
(
pid_t
pid
,
virBitmapPtr
map
);
int
virProcessGetAffinity
(
pid_t
pid
,
virBitmapPtr
*
map
,
int
maxcpu
);
#endif
/* __VIR_PROCESS_H__ */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录