Re: [libvirt] [PATCH 0/4] Improve netlink to support all protocols.

2012-07-25 Thread tangchen
Hi Viktor, Eric: Would you please have a look at thest patches ? If this way is acceptable, I will improve libvirt to support cpu hotplug uevent based on netlink. Thanks. :) On 07/23/2012 02:33 PM, tangchen wrote: > Now, netlink in libvirt only suport NETLINK_ROUTE protocol. > But w

[libvirt] [PATCH 10/12] Introduce qemudDomainPinHypervisorFlags and qemudDomainGetHypervisorPinInfo in qemu driver.

2012-07-24 Thread tangchen
From: Tang Chen Introduce 2 APIs to support hypervisor threads pin in qemu driver. 1) qemudDomainPinHypervisorFlags: setup hypervisor threads pin info. 2) qemudDomainGetHypervisorPinInfo: get all hypervisor threads pin info. They are similar to qemudDomainPinVcpuFlags and qemudDomainGetVc

[libvirt] [PATCH 12/12] Improve vcpupin to support hypervisorpin dynically.

2012-07-24 Thread tangchen
From: Tang Chen Modify vcpupin command to support hypervisor threads pin. 1) add "--hypervisor" option to get hypervisor threads info. 2) add "--hypervisor cpuset" to set hypervisor threads to specified cpuset. Signed-off-by: Tang Chen Signed-off-by: Hu Tao --- tests/vcpupin |6

[libvirt] [PATCH 11/12] Introduce remoteDomainPinHypervisorFlags and remoteDomainGetHypervisorPinInfo functions in remote driver.

2012-07-24 Thread tangchen
From: Tang Chen Introduce 2 APIs to support hypervisor threads in remote driver. 1) remoteDomainPinHypervisorFlags: call driver api, such as qemudDomainPinHypervisorFlags. 2) remoteDomainGetHypervisorPinInfo: call driver api, such as qemudDomainGetHypervisorPinInfo. They are similar to

[libvirt] [PATCH 09/12] Introduce virDomainPinHypervisorFlags and virDomainGetHypervisorPinInfo functions.

2012-07-24 Thread tangchen
From: Tang Chen Introduce 2 APIs for client to use. 1) virDomainPinHypervisorFlags: call remote driver api, such as remoteDomainPinHypervisorFlags. 2) virDomainGetHypervisorPinInfo: call remote driver api, such as remoteDomainGetHypervisorPinInfo. Signed-off-by: Tang Chen Signed-off-b

[libvirt] [PATCH 08/12] Introduce virDomainHypervisorPinAdd and virDomainHypervisorPinDel functions

2012-07-24 Thread tangchen
From: Tang Chen Introduce 2 APIs to support hypervisor threads pin. 1) virDomainHypervisorPinAdd: setup hypervisor threads pin with a given cpumap string. 2) virDomainHypervisorPinDel: remove all hypervisor threads pin. Signed-off-by: Tang Chen Signed-off-by: Hu Tao --- src/conf/doma

[libvirt] [PATCH v4 00/12] Support hypervisor-threads-pin in vcpupin.

2012-07-24 Thread tangchen
Users can use vcpupin command to bind a vcpu thread to a specific physical cpu. But besides vcpu threads, there are alse some other threads created by qemu (known as hypervisor threads) that could not be explicitly bound to physical cpus. The first 3 patches are from Wen Congyang, which implemen

[libvirt] [PATCH 07/12] Add qemuProcessSetHypervisorAffinites and set hypervisor threads affinities

2012-07-24 Thread tangchen
From: Tang Chen Hypervisor threads should also be pinned by sched_setaffinity(), just the same as vcpu threads. Signed-off-by: Tang Chen Signed-off-by: Hu Tao --- src/qemu/qemu_process.c | 54 +++ 1 file changed, 54 insertions(+) diff --git a/src

[libvirt] [PATCH 04/12] Enable cpuset cgroup and synchronous vcpupin info to cgroup.

2012-07-24 Thread tangchen
From: Tang Chen vcpu threads pin are implemented using sched_setaffinity(), but not controlled by cgroup. This patch does the following things: 1) enable cpuset cgroup 2) reflect all the vcpu threads pin info to cgroup Signed-off-by: Tang Chen Signed-off-by: Hu Tao --- src/libvirt_pr

[libvirt] [PATCH 05/12] Support hypervisorpin xml parse.

2012-07-24 Thread tangchen
From: Tang Chen This patch adds a new xml element , and also the parser functions, docs, and tests. hypervisorpin means pinning hypervisor threads, and cpuset = '1' means pinning all hypervisor threads to cpu 1. Signed-off-by: Tang Chen Signed-off-by: Hu Tao --- docs/schemas/domaincommon.rng

[libvirt] [PATCH 06/12] Introduce qemuSetupCgroupHypervisorPin and synchronize hypervisorpin info to cgroup.

2012-07-24 Thread tangchen
From: Tang Chen Introduce qemuSetupCgroupHypervisorPin() function to add hypervisor threads pin info to cpuset cgroup, the same as vcpupin. Signed-off-by: Tang Chen Signed-off-by: Hu Tao --- src/qemu/qemu_cgroup.c | 36 src/qemu/qemu_cgroup.h |1 + 2

[libvirt] [PATCH 03/12] create a new cgroup and move all hypervisor threads to the new cgroup

2012-07-24 Thread tangchen
From: Wen Congyang Create a new cgroup and move all hypervisor threads to the new cgroup. And then we can do the other things: 1. limit only vcpu usage rather than the whole qemu 2. limit for hypervisor threads(include vhost-net threads) Signed-off-by: Wen Congyang Signed-off-by: Tang Chen Sig

[libvirt] [PATCH 02/12] Introduce the function virCgroupMoveTask

2012-07-24 Thread tangchen
From: Wen Congyang Introduce a new API to move tasks of one controller from a cgroup to another cgroup Signed-off-by: Wen Congyang Signed-off-by: Tang Chen Signed-off-by: Hu Tao --- src/libvirt_private.syms |2 + src/util/cgroup.c| 111 ++

[libvirt] [PATCH 01/12] Introduce the function virCgroupForHypervisor

2012-07-24 Thread tangchen
From: Wen Congyang Introduce the function virCgroupForHypervisor() to create sub directory for hypervisor thread(include I/O thread, vhost-net thread) Signed-off-by: Wen Congyang Signed-off-by: Tang Chen Signed-off-by: Hu Tao --- src/libvirt_private.syms |1 + src/util/cgroup.c|

[libvirt] [PATCH 4/4] DEBUG: print out netlink message.

2012-07-22 Thread tangchen
Signed-off-by: Tang Chen --- src/util/virnetlink.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 401a8eb..b6c5ded 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -340,6 +340,8 @@ virNetlinkEventCallback(int watch,

Re: [libvirt] [RFC] [PATCH] Support for uevent netlink and hotplug event.

2012-07-22 Thread tangchen
Hi Viktor, I sent a new version patch set, and please have a look at them. On 07/19/2012 01:17 AM, Viktor Mihajlovski wrote: >> +nl_join_groups(srv->netlinknh, groups); > > AFAIK nl_join_groups is deprecated and should be replaced by a > setsockopt( ..., NETLINK_ADD_MEMBERSHIP,...) > > Fur

[libvirt] [PATCH 2/4] Introduce virNetlinkEventServiceStopAll() to stop all netlink services in libvirt.

2012-07-22 Thread tangchen
This patch introduce virNetlinkEventServiceStopAll() to stop all the monitors to receive netlink messages for libvirtd. Signed-off-by: Tang Chen --- src/libvirt_private.syms |1 + src/util/virnetlink.c| 50 ++ src/util/virnetlink.h|5

[libvirt] [PATCH 3/4] Modify all the function calls for API in virnetlink.c

2012-07-22 Thread tangchen
This patch fixes the function prototype in all the callers of for API in virnetlink.c Signed-off-by: Tang Chen --- daemon/libvirtd.c| 12 +--- src/util/virnetdev.c |6 -- src/util/virnetdevmacvlan.c | 12 +++- src/util/virnetdevvportpr

[libvirt] [PATCH 1/4] Improve netlink to support all protocol.

2012-07-22 Thread tangchen
This patch improve all the API in virnetlink.c to support all kinds of netlink protocols, and make all netlink sockets be able to join in groups. Signed-off-by: Tang Chen --- src/util/virnetlink.c | 183 + src/util/virnetlink.h | 17 +++-- 2 fil

[libvirt] [PATCH 0/4] Improve netlink to support all protocols.

2012-07-22 Thread tangchen
Now, netlink in libvirt only suport NETLINK_ROUTE protocol. But we need other netlinks, especially to support cpu and memory hotplug. These patches did the following things: 1) Change global variable "server" to an array to store all the netlink sockets, and modified all the API protot

Re: [libvirt] [PATCH 00/13] Support hypervisor-threads-pin in vcpupin.

2012-07-20 Thread tangchen
Hi eric, Would you please take sometime to have a look at these patches ? Thanks. :) On 07/10/2012 02:28 PM, tangchen wrote: > Hi~ > > Users can use vcpupin command to bind a vcpu thread to a specific physical > cpu. > But besides vcpu threads, there are alse some other thr

Re: [libvirt] [RFC] [PATCH] Support for uevent netlink and hotplug event.

2012-07-18 Thread tangchen
have any comments. :) If you think this is OK, then I will try to improve all of them. Thanks. On 07/19/2012 01:17 AM, Viktor Mihajlovski wrote: > On 07/18/2012 02:22 PM, tangchen wrote: >> NOTE: This patch is just for some comments, so that we can try to >>improve netlin

[libvirt] [RFC] [PATCH] Support for uevent netlink and hotplug event.

2012-07-18 Thread tangchen
NOTE: This patch is just for some comments, so that we can try to improve netlink support in libvirt. This patch introduces a new global array servers[MAX_LINKS], and all the netlink protocol (at most 32 protocols) can be supportted. And also, it creates a NETLINK_KOBJECT_UEVENT socket to l

Re: [libvirt] [RFC] Support cpu hotplug in libvirt.

2012-07-18 Thread tangchen
Hi Viktor: On 07/18/2012 05:06 PM, Viktor Mihajlovski wrote: > I was actually considering a workaround in libvirt for what I believe to be a > kernel misbehavior, however it is possible to deconfigure the cpuset > controller > in the host (i.e. removing it from /etc/cgconfig.conf). The CPU pinn

Re: [libvirt] [RFC] Support cpu hotplug in libvirt.

2012-07-17 Thread tangchen
Hi~ On 07/18/2012 09:44 AM, Eric Blake wrote: > On 07/17/2012 07:33 PM, tangchen wrote: >> Hi~ >> >> It seems that libvirt is not cpu hotplug aware. > > Portions of libvirt are aware of host hotplug issues, but you are > correct that there are still lingering b

[libvirt] [RFC] Support cpu hotplug in libvirt.

2012-07-17 Thread tangchen
Hi~ It seems that libvirt is not cpu hotplug aware. Please refer to the following problem. 1. At first, we have 2 cpus. # cat /cgroup/cpuset/cpuset.cpus 0-1 # cat /cgroup/cpuset/libvirt/qemu/cpuset.cpus 0-1 2. And we have a vm1 with following configuration. 3. Offline cpu1. #

Re: [libvirt] [PATCH 01/13] Introduce the function virCgroupForHypervisor

2012-07-10 Thread tangchen
hi~ On 07/10/2012 08:44 PM, Eric Blake wrote: > The subject should include 'v2' to mention that this is a respin; you > can do that with 'git send-email --subject-prefix=PATCHv2'. > > On 07/10/2012 03:11 AM, tangchen wrote: >> Introduce the function

Re: [libvirt] [PATCH 03/13] create a new cgroup and move all hypervisor threads to the new cgroup

2012-07-10 Thread tangchen
hi~ On 07/03/2012 07:06 AM, Eric Blake wrote: > On 06/05/2012 02:16 AM, tangchen wrote: >> create a new cgroup and move all hypervisor threads to the new cgroup. >> And then we can do the other things: >> 1. limit only vcpu usage rather than the whole qemu >> 2. l

Re: [libvirt] [PATCH 02/13] Introduce the function virCgroupMoveTask

2012-07-10 Thread tangchen
hi~ >> +int virCgroupMoveTask(virCgroupPtr src_group, virCgroupPtr dest_group) >> +{ >> +int rc = 0; >> +int i; >> +char *content, *value, *next; >> + >> +for (i = 0 ; i < VIR_CGROUP_CONTROLLER_LAST ; i++) { >> +/* Skip over controllers not mounted */ >> +if (!src_g

[libvirt] [PATCH 13/13] Improve vcpupin to support hypervisorpin dynically.

2012-07-10 Thread tangchen
Modify vcpupin command to support hypervisor threads pin. 1) add "--hypervisor" option to get hypervisor threads info. 2) add "--hypervisor cpuset" to set hypervisor threads to specified cpuset. Signed-off-by: Tang Chen --- tests/vcpupin |6 +-- tools/virsh.c | 147 +

[libvirt] [PATCH 12/13] Introduce virDomainPinHypervisorFlags and virDomainGetHypervisorPinInfo functions.

2012-07-10 Thread tangchen
Introduce 2 APIs for client to use. 1) virDomainPinHypervisorFlags: call remote driver api, such as remoteDomainPinHypervisorFlags. 2) virDomainGetHypervisorPinInfo: call remote driver api, such as remoteDomainGetHypervisorPinInfo. Signed-off-by: Tang Chen --- include/libvirt/libvirt.h

[libvirt] [PATCH 10/13] Introduce remoteDomainPinHypervisorFlags and remoteDomainGetHypervisorPinInfo functions in remote driver.

2012-07-10 Thread tangchen
Introduce 2 APIs to support hypervisor threads in remote driver. 1) remoteDomainPinHypervisorFlags: call driver api, such as qemudDomainPinHypervisorFlags. 2) remoteDomainGetHypervisorPinInfo: call driver api, such as qemudDomainGetHypervisorPinInfo. They are similar to remoteDomainPinVcp

[libvirt] [PATCH 09/13] Introduce qemudDomainPinHypervisorFlags and qemudDomainGetHypervisorPinInfo in qemu driver.

2012-07-10 Thread tangchen
Introduce 2 APIs to support hypervisor threads pin in qemu driver. 1) qemudDomainPinHypervisorFlags: setup hypervisor threads pin info. 2) qemudDomainGetHypervisorPinInfo: get all hypervisor threads pin info. They are similar to qemudDomainPinVcpuFlags and qemudDomainGetVcpuPinInfo. Signed

[libvirt] [PATCH 11/13] Introduce remoteDispatchDomainPinHypervisorFlags and remoteDispatchDomainGetHypervisorPinInfo functions.

2012-07-10 Thread tangchen
Signed-off-by: Tang Chen --- daemon/remote.c | 103 +++ 1 file changed, 103 insertions(+) diff --git a/daemon/remote.c b/daemon/remote.c index 095d854..15dfa9b 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1509,6 +1509,109 @@ no_memor

[libvirt] [PATCH 02/13] Introduce the function virCgroupMoveTask

2012-07-10 Thread tangchen
Introduce a new API to move tasks of one controller from a cgroup to another cgroup Signed-off-by: Wen Congyang --- src/libvirt_private.syms |2 + src/util/cgroup.c| 127 ++ src/util/cgroup.h|8 +++ 3 files changed, 137 insert

[libvirt] [PATCH 08/13] Introduce virDomainHypervisorPinAdd and virDomainHypervisorPinDel functions

2012-07-10 Thread tangchen
Introduce 2 APIs to support hypervisor threads pin. 1) virDomainHypervisorPinAdd: setup hypervisor threads pin with a given cpumap string. 2) virDomainHypervisorPinDel: remove all hypervisor threads pin. Signed-off-by: Tang Chen --- src/conf/domain_conf.c | 76 ++

[libvirt] [PATCH 07/13] Add qemuProcessSetHypervisorAffinites and set hypervisor threads affinities

2012-07-10 Thread tangchen
Hypervisor threads should also be pinned by sched_setaffinity(), just the same as vcpu threads. Signed-off-by: Tang Chen --- src/qemu/qemu_process.c | 54 +++ 1 file changed, 54 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_proc

[libvirt] [PATCH 06/13] Introduce qemuSetupCgroupHypervisorPin and synchronize hypervisorpin info to cgroup.

2012-07-10 Thread tangchen
Introduce qemuSetupCgroupHypervisorPin() function to add hypervisor threads pin info to cpuset cgroup, the same as vcpupin. Signed-off-by: Tang Chen --- src/qemu/qemu_cgroup.c | 36 src/qemu/qemu_cgroup.h |1 + 2 files changed, 37 insertions(+) diff --

[libvirt] [PATCH 05/13] Support hypervisorpin xml parse.

2012-07-10 Thread tangchen
This patch adds a new xml element , and also the parser functions, docs, and tests. hypervisorpin means pinning hypervisor threads, and cpuset = '1' means pinning all hypervisor threads to cpu 1. Signed-off-by: Tang Chen --- docs/schemas/domaincommon.rng |7 ++ src/conf/dom

[libvirt] [PATCH 03/13] create a new cgroup and move all hypervisor threads to the new cgroup

2012-07-10 Thread tangchen
create a new cgroup and move all hypervisor threads to the new cgroup. And then we can do the other things: 1. limit only vcpu usage rather than the whole qemu 2. limit for hypervisor threads(include vhost-net threads) Signed-off-by: Wen Congyang --- src/qemu/qemu_cgroup.c | 67 ++

[libvirt] [PATCH 04/13] Enable cpuset cgroup and synchronous vcpupin info to cgroup.

2012-07-10 Thread tangchen
vcpu threads pin are implemented using sched_setaffinity(), but not controlled by cgroup. This patch does the following things: 1) enable cpuset cgroup 2) reflect all the vcpu threads pin info to cgroup Signed-off-by: Tang Chen --- src/libvirt_private.syms |2 ++ src/qemu/qemu_cgrou

[libvirt] [PATCH 01/13] Introduce the function virCgroupForHypervisor

2012-07-10 Thread tangchen
Introduce the function virCgroupForHypervisor() to create sub directory for hypervisor thread(include I/O thread, vhost-net thread) Signed-off-by: Wen Congyang --- .gnulib |2 +- src/libvirt_private.syms |1 + src/util/cgroup.c| 42 +

Re: [libvirt] [PATCH 01/13] Introduce the function virCgroupForHypervisor

2012-07-10 Thread tangchen
Hi~ The sign-off-by problems have been solved, and a new rebased patch set will be sent soon. I am testing it, thanks. :) On 07/03/2012 04:40 AM, Eric Blake wrote: > On 06/05/2012 02:13 AM, tangchen wrote: >> Introduce the function virCgroupForHypervisor() to create sub directo

[libvirt] [PATCH 00/13] Support hypervisor-threads-pin in vcpupin.

2012-07-10 Thread tangchen
Hi~ Users can use vcpupin command to bind a vcpu thread to a specific physical cpu. But besides vcpu threads, there are alse some other threads created by qemu (known as hypervisor threads) that could not be explicitly bound to physical cpus. The first 3 patches are from Wen Congyang, which imp

[libvirt] [PATCH] Fix a string format bug in qemu_cgroup.c

2012-07-05 Thread tangchen
Signed-off-by: Tang Chen --- src/qemu/qemu_cgroup.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index f8f375f..662d41d 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -473,8 +473,8 @@ cleanup:

Re: [libvirt] [PATCH 01/13] Introduce the function virCgroupForHypervisor

2012-07-02 Thread tangchen
Hi~ On 07/03/2012 04:40 AM, Eric Blake wrote: > On 06/05/2012 02:13 AM, tangchen wrote: >> Introduce the function virCgroupForHypervisor() to create sub directory >> for hypervisor thread(include I/O thread, vhost-net thread) > > According to your cover letter, this patch wa

Re: [libvirt] [PATCH 00/13] Support hypervisor-threads-pin in vcpupin.

2012-07-01 Thread tangchen
Hi, Eric On 06/07/2012 03:45 AM, Eric Blake wrote: > On 06/05/2012 02:08 AM, tangchen wrote: >> Hi~ >> >> Users can use vcpupin command to bind a vcpu thread to a specific physical >> cpu. >> But besides vcpu threads, there are alse some other threads created

Re: [libvirt] [PATCH 00/13] Support hypervisor-threads-pin in vcpupin.

2012-06-28 Thread tangchen
Hi~ If anybody have time to take a look at these patches, please give some comments. Thanks.:) On 06/07/2012 03:45 AM, Eric Blake wrote: > On 06/05/2012 02:08 AM, tangchen wrote: >> Hi~ >> >> Users can use vcpupin command to bind a vcpu thread to a specific physical >&g

[libvirt] [PATCH 12/13] Introduce virDomainPinHypervisorFlags and virDomainGetHypervisorPinInfo functions

2012-06-05 Thread tangchen
Signed-off-by: Tang Chen --- include/libvirt/libvirt.h.in |9 +++ src/libvirt.c| 147 ++ src/libvirt_public.syms |6 ++ 3 files changed, 162 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/lib

[libvirt] [PATCH 13/13] Improve vcpupin to support hypervisorpin dynically

2012-06-05 Thread tangchen
Signed-off-by: Tang Chen --- tests/vcpupin |6 +- tools/virsh.c | 145 +-- tools/virsh.pod | 16 -- 3 files changed, 110 insertions(+), 57 deletions(-) diff --git a/tests/vcpupin b/tests/vcpupin index 5952862..ffd16fa 100755 ---

[libvirt] [PATCH 11/13] Introduce remoteDispatchDomainPinHypervisorFlags and remoteDispatchDomainGetHypervisorPinInfo functions

2012-06-05 Thread tangchen
Signed-off-by: Tang Chen --- daemon/remote.c | 103 +++ 1 files changed, 103 insertions(+), 0 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index a02c09b..823338a 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1454,6 +145

[libvirt] [PATCH 10/13] Introduce remoteDomainPinHypervisorFlags and remoteDomainGetHypervisorPinInfo functions in remote driver

2012-06-05 Thread tangchen
Signed-off-by: Tang Chen --- src/remote/remote_driver.c | 102 ++ src/remote/remote_protocol.x | 24 +- src/remote_protocol-structs | 24 ++ 3 files changed, 149 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c

[libvirt] [PATCH 09/13] Introduce qemudDomainPinHypervisorFlags and qemudDomainGetHypervisorPinInfo in qemu driver

2012-06-05 Thread tangchen
Signed-off-by: Tang Chen --- src/driver.h | 13 +++- src/qemu/qemu_driver.c | 223 2 files changed, 235 insertions(+), 1 deletions(-) diff --git a/src/driver.h b/src/driver.h index aa7a377..dab21ca 100644 --- a/src/driver.h +++ b/src/

[libvirt] [PATCH 08/13] Introduce virDomainHypervisorPinAdd and virDomainHypervisorPinDel functions

2012-06-05 Thread tangchen
Signed-off-by: Tang Chen --- src/conf/domain_conf.c | 76 ++ src/conf/domain_conf.h |6 src/libvirt_private.syms |2 + 3 files changed, 84 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c ind

[libvirt] [PATCH 07/13] Add qemuProcessSetHypervisorAffinites and set hypervisor threads affinities

2012-06-05 Thread tangchen
Signed-off-by: Tang Chen --- src/qemu/qemu_process.c | 54 +++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 31c2c30..e73cc92 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

[libvirt] [PATCH 06/13] Introduce qemuSetupCgroupHypervisorPin and synchronize hypervisorpin info to cgroup

2012-06-05 Thread tangchen
Introduce qemuSetupCgroupHypervisorPin() function and synchronize hypervisorpin info to cgroup. Signed-off-by: Tang Chen --- src/qemu/qemu_cgroup.c | 41 + src/qemu/qemu_cgroup.h |1 + 2 files changed, 42 insertions(+), 0 deletions(-) diff --git a

[libvirt] [PATCH 05/13] Support hypervisorpin xml parse

2012-06-05 Thread tangchen
This patch adds a new xml element , and also the parser functions, docs, and tests. Signed-off-by: Tang Chen --- docs/schemas/domaincommon.rng |7 ++ src/conf/domain_conf.c | 97 ++- src/conf/domain_conf.h

[libvirt] [PATCH 04/13] Enable cpuset cgroup and synchronous vcpupin info to cgroup

2012-06-05 Thread tangchen
This patch enables cpuset cgroup, and synchronous vcpupin info set by sched_setaffinity() to cgroup. Signed-off-by: Tang Chen --- src/libvirt_private.syms |2 + src/qemu/qemu_cgroup.c | 51 - src/qemu/qemu_cgroup.h |2 + src/qemu/qemu_dr

[libvirt] [PATCH 02/13] Introduce the function virCgroupMoveTask

2012-06-05 Thread tangchen
Introduce a new API to move all tasks from a cgroup to another cgroup --- src/libvirt_private.syms |1 + src/util/cgroup.c| 55 ++ src/util/cgroup.h|2 + 3 files changed, 58 insertions(+), 0 deletions(-) diff --git a/src/libvir

[libvirt] [PATCH 03/13] create a new cgroup and move all hypervisor threads to the new cgroup

2012-06-05 Thread tangchen
create a new cgroup and move all hypervisor threads to the new cgroup. And then we can do the other things: 1. limit only vcpu usage rather than the whole qemu 2. limit for hypervisor threads(include vhost-net threads) --- src/qemu/qemu_cgroup.c | 57

[libvirt] [PATCH 01/13] Introduce the function virCgroupForHypervisor

2012-06-05 Thread tangchen
Introduce the function virCgroupForHypervisor() to create sub directory for hypervisor thread(include I/O thread, vhost-net thread) --- src/libvirt_private.syms |1 + src/util/cgroup.c| 42 ++ src/util/cgroup.h|4 3 files chang

[libvirt] [PATCH 00/13] Support hypervisor-threads-pin in vcpupin.

2012-06-05 Thread tangchen
Hi~ Users can use vcpupin command to bind a vcpu thread to a specific physical cpu. But besides vcpu threads, there are alse some other threads created by qemu (known as hypervisor threads) that could not be explicitly bound to physical cpus. The first 3 patches are from Wen Congyang, which imp

[libvirt] [PATCH 10/10] Improve vcpupin to support hypervisorpin dynically.

2012-05-08 Thread tangchen
Signed-off-by: Tang Chen --- tests/vcpupin |6 +- tools/virsh.c | 145 +-- tools/virsh.pod | 16 -- 3 files changed, 110 insertions(+), 57 deletions(-) diff --git a/tests/vcpupin b/tests/vcpupin index 5952862..ffd16fa 100755 ---

Re: [libvirt] [PATCH 00/10] Support hypervisor-threads-pin in vcpupin.

2012-05-08 Thread tangchen
Hi~ Forgot to mention that this patch set is based on Wen Congyang's patch set: "support to set cpu bandwidth for hypervisor threads" https://www.redhat.com/archives/libvir-list/2012-April/msg01326.html Wen's patches should be applied first. Thanks.:) On 05/09/2012 02:0

[libvirt] [PATCH 05/10] Introduce virDomainHypervisorPinAdd and virDomainHypervisorPinDel functions.

2012-05-08 Thread tangchen
Signed-off-by: Tang Chen --- src/conf/domain_conf.c | 76 ++ src/conf/domain_conf.h |6 src/libvirt_private.syms |2 + 3 files changed, 84 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c ind

[libvirt] [PATCH 09/10] Introduce virDomainPinHypervisorFlags and virDomainGetHypervisorPinInfo functions.

2012-05-08 Thread tangchen
Signed-off-by: Tang Chen --- include/libvirt/libvirt.h.in |9 +++ src/libvirt.c| 147 ++ src/libvirt_public.syms |2 + 3 files changed, 158 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libv

[libvirt] [PATCH 08/10] Introduce remoteDispatchDomainPinHypervisorFlags and remoteDispatchDomainGetHypervisorPinInfo functions.

2012-05-08 Thread tangchen
Signed-off-by: Tang Chen --- daemon/remote.c | 103 +++ 1 files changed, 103 insertions(+), 0 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 16a8a05..524c4bf 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1454,6 +145

[libvirt] [PATCH 06/10] Introduce qemudDomainPinHypervisorFlags and qemudDomainGetHypervisorPinInfo in qemu driver.

2012-05-08 Thread tangchen
Signed-off-by: Tang Chen --- src/driver.h | 13 +++- src/qemu/qemu_driver.c | 223 2 files changed, 235 insertions(+), 1 deletions(-) diff --git a/src/driver.h b/src/driver.h index 03d249b..18f7f26 100644 --- a/src/driver.h +++ b/src/

[libvirt] [PATCH 07/10] Introduce remoteDomainPinHypervisorFlags and remoteDomainGetHypervisorPinInfo functions in remote driver.

2012-05-08 Thread tangchen
Signed-off-by: Tang Chen --- src/remote/remote_driver.c | 102 ++ src/remote/remote_protocol.x | 24 +- src/remote_protocol-structs | 24 ++ 3 files changed, 149 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c

[libvirt] [PATCH 04/10] Add qemuProcessSetHypervisorAffinites and set hypervisor threads affinities.

2012-05-08 Thread tangchen
Signed-off-by: Tang Chen --- src/qemu/qemu_process.c | 54 +++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index b605eee..33f65e1 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

[libvirt] [PATCH 03/10] Add qemuSetupCgroupHypervisorPin and synchronize hypervisorpin info to cgroup.

2012-05-08 Thread tangchen
Signed-off-by: Tang Chen --- src/qemu/qemu_cgroup.c | 41 + src/qemu/qemu_cgroup.h |1 + 2 files changed, 42 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index a123a00..2d8d9ee 100644 --- a/src/qemu/qemu_

[libvirt] [PATCH 02/10] Support hypervisorpin xml parse.

2012-05-08 Thread tangchen
Signed-off-by: Tang Chen --- docs/schemas/domaincommon.rng |7 ++ src/conf/domain_conf.c | 96 ++- src/conf/domain_conf.h |1 + tests/qemuxml2argvdata/qemuxml2argv-cputune.xml |1 + 4 files chang

[libvirt] [PATCH 01/10] Enable cpuset cgroup and synchronous vcpupin info to cgroup.

2012-05-08 Thread tangchen
This patch enables cpuset cgroup, and synchronous vcpupin info set by sched_setaffinity() to cgroup. Signed-off-by: Tang Chen --- src/qemu/qemu_cgroup.c | 47 +++ src/qemu/qemu_cgroup.h |2 ++ src/qemu/qemu_driver.c | 43 ++

[libvirt] [PATCH 00/10] Support hypervisor-threads-pin in vcpupin.

2012-05-08 Thread tangchen
Hi~ Users can use vcpupin command to bind a vcpu thread to a specific physical cpu. But besides vcpu threads, there are alse some other threads created by qemu (known as hypervisor threads) that could not be explicitly bound to physical cpus. This 10 patches implemented hypervisor threads bindi

[libvirt] [PATCH] The output of domxml-to-native should be the same as the actual commandline.

2011-10-20 Thread tangchen
ays set to false in qemuDomainXMLToNative(). Here is the patch, please comment! Signed-off-by: tangchen --- src/qemu/qemu_driver.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2e6f3e4..a564afb 100644 ---

Re: [libvirt] [PATCH] virsh: Update the help information for undefine command.

2011-10-07 Thread tangchen
Hi, > Thanks. This is a bit long, so I shortened it to: > > diff --git a/tools/virsh.c b/tools/virsh.c > index 3da8bc5..9532bc3 100644 > --- a/tools/virsh.c > +++ b/tools/virsh.c > @@ -1897,8 +1897,9 @@ cmdDefine(vshControl *ctl, const vshCmd *cmd) > * "undefine" command > */ > static const

[libvirt] [PATCH] virsh: Update the help information for undefine command.

2011-10-07 Thread tangchen
virsh undefine command can now undefine an active guest, but the help information is still the old. This patch modifies it and make it coincident to the manpage of virsh. Signed-off-by: tangchen --- tools/virsh.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a