[libvirt] [PATCH 2/2] cpuset: removing original sched_setaffinity path

Daniel P. Berrange berrange at redhat.com
Thu Jun 30 09:33:15 UTC 2011


On Thu, Jun 30, 2011 at 11:16:27AM +0800, Gui Jianfeng wrote:
> Since we have controlled Guest cpu affinity by using cpuset cgroup.
> Get rid of this part.
> 
> Signed-off-by: Gui Jianfeng <guijianfeng at cn.fujitsu.com>
> ---
>  src/qemu/qemu_process.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 88a31a3..079666f 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -2056,12 +2056,6 @@ static int qemuProcessHook(void *data)
>      if (qemuAddToCgroup(h->driver, h->vm->def) < 0)
>          goto cleanup;
>  
> -    /* This must be done after cgroup placement to avoid resetting CPU
> -     * affinity */
> -    VIR_DEBUG("Setup CPU affinity");
> -    if (qemuProcessInitCpuAffinity(h->vm) < 0)
> -        goto cleanup;
> -
>      if (qemuProcessInitNumaMemoryPolicy(h->vm) < 0)
>          return -1;

This will cause a regresion for anyone who hasn't got Cgroups
support in their kernel, or who has not mounted the cpuset
controller.

I don't believe there should be any harm to just leaving this
in place.

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




More information about the libvir-list mailing list