[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 bugs (I just found one today in
nodeinfo.c).

> 4. Online cpu1.
> # echo 1 > /sys/devices/system/cpu/cpu1/online
> # cat /sys/devices/system/cpu/cpu1/online 
> 1
> # cat /cgroup/cpuset/cpuset.cpus 
> 0-1
> # cat /cgroup/cpuset/libvirt/cpuset.cpus 
> 0

I think this is related to (if not the same as) this known kernel bug:
https://bugzilla.redhat.com/show_bug.cgi?id=714271

Basically, when the kernel suspends and then resumes, it is not properly
restoring descendant cgroup information.  Hot unplug of a host cpu is
more or less a subset of suspending.

> 
> 
> I am trying to use netlink socket with NETLINK_KOBJECT_UEVENT protocol to
> listen to cpu hotplug events. But I met a little problem here.

Interesting approach.  Is it also possible to use inotify?

> 
> virNetlinkEventServiceStart() only create a global variable server, and 
> create a NETLINK_ROUTE netlink socket for it. 
> 
> So if I want to create another different netlink socket, such as NETLINK_KOBJECT_UEVENT, 
> what should I do ?

I'm not sure here, having not really coded much with netlink sockets
myself.  If you have a patch pending, then post it and we can discuss
whether it can be improved.

> 
> Shall we make the server global variable a global array ?
> (It seems there are a lot of work to do.)
> 
> Thanks. :)
> 

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

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]