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

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

 



Hi Eric,

Came across a thread where the kernel stands not to change the
cpuset's behavior during the online->offline->online scenario.

https://lkml.org/lkml/2012/5/4/265

Hope fixing this in Libvirt makes more sense now.

Regards,
Shivaprasad G Bhat

On Sat, Feb 1, 2014 at 8:49 AM, Shivaprasad bhat
<shivaprasadbhat@xxxxxxxxx> wrote:
> Thanks for the comments Eric.
>
> The offline, removes the entry from the cgroups and all its subcgroups.
> On Online, I guess kernel does not know till which sub-cgroup it
> should add the entry.
> I think that is how cgroup is designed to behave when it lacks the
> policy knowledge.
> Let me know what you think.
>
> Regards,
> Shivaprasad G Bhat
>
> On Fri, Jan 31, 2014 at 9:58 PM, Eric Blake <eblake@xxxxxxxxxx> wrote:
>> 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@xxxxxxxxxxxxxxxxxx>
>>> ---
>>>  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
>>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]