Re: [REPOST 4/4] qemu: Put the emulator cgroup pid into the right task file

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

 



On Wed, Jan 13, 2016 at 07:29:50AM -0500, John Ferlan wrote:
> Recently reverted commit id 'a41c00b4' was designed to move the setting
> of the task file into the right place in the cgroup hierarchy. This patch
> applies the portion of the reverted patch which writes the pid to the
> right task file.
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/qemu/qemu_cgroup.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
> index 16c6492..a0ad03f 100644
> --- a/src/qemu/qemu_cgroup.c
> +++ b/src/qemu/qemu_cgroup.c
> @@ -1168,6 +1168,10 @@ qemuSetupCgroupForEmulator(virDomainObjPtr vm)
>              goto cleanup;
>      }
>  
> +    /* consider the first thread an emulator-thread */
> +    if (virCgroupAddTask(cgroup_emulator, vm->pid) < 0)
> +        goto cleanup;
> +
>      virCgroupFree(&cgroup_emulator);
>      return 0;

This doesn't actually do anything useful. Take a look further
up in this method and you'll see virCgroupMoveTask() which moves
every single PID, including vm->pid.

So NACK to this as it doesn't solve the race condition Henning was
addressing.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]