[libvirt] [PATCH] Host cpu offline/online removes the cpus available for vms

Eric Blake eblake at redhat.com
Fri Jan 31 16:28:05 UTC 2014


On 01/31/2014 12:22 AM, Shivaprasad G Bhat wrote:
> Online/Offline operations on the host cpus removes the machine/cpuset.cpus
> which are never added back. The guests with vcpu pinning can fail to boot
> unless the xml is edited.
> 
> If the possibility that the offlined cpus are onlined back, the cpuset.cpus can be updated upon start of the guest thus allowing the guests to boot back without
> erroring out.

Please wrap commit message lines; typically, wrapping less than 70
characters since 'git log' indents the lines.

> 
> Signed-off-by: Shivaprasad G Bhat <sbhat at linux.vnet.ibm.com>
> ---
>  src/util/vircgroup.c |   27 +++++++++++++++++----------
>  1 file changed, 17 insertions(+), 10 deletions(-)
> 
> diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
> index a6d60c5..52575c9 100644
> --- a/src/util/vircgroup.c
> +++ b/src/util/vircgroup.c
> @@ -72,6 +72,7 @@ typedef enum {
>                                         * before creating subcgroups and
>                                         * attaching tasks
>                                         */
> +    VIR_CGROUP_CPUS_HIERACHY = 1 << 1, /* call virCgroupCpuSetInherit */

s/HIERACHY/HIERARCHY/

I'm not sure about the technical aspect of this patch, on whether this
is the best approach to deal with the situation.  I think the kernel has
caused several issues with how it handles offline cpu vs. cgroups, and
wonder if the fix belongs in the kernel.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140131/35d2acf6/attachment-0001.sig>


More information about the libvir-list mailing list