[libvirt] [PATCH 4/7] Add new cgroup thread type

Dmitry Guryanov dguryanov at virtuozzo.com
Thu Jan 14 11:45:44 UTC 2016


On Tue, 2016-01-12 at 19:42 +0300, Alexander Burluka wrote:
> Signed-off-by: Alexander Burluka <aburluka at virtuozzo.com>
> ---
>  src/util/vircgroup.c | 4 ++++
>  src/util/vircgroup.h | 1 +
>  2 files changed, 5 insertions(+)
> 
> diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
> index 78f519c..b829794 100644
> --- a/src/util/vircgroup.c
> +++ b/src/util/vircgroup.c
> @@ -1514,6 +1514,10 @@ virCgroupNewThread(virCgroupPtr domain,
>          if (virAsprintf(&name, "iothread%d", id) < 0)
>              goto cleanup;
>          break;
> +    case VIR_CGROUP_THREAD_GLOBAL:
> +        if (VIR_STRDUP(name, "") < 0)
> +            goto cleanup;
> +        break;
>      case VIR_CGROUP_THREAD_LAST:

This function called with VIR_CGROUP_THREAD_GLOBAL will do nothing, see comment to
the 6th patch.

>          virReportError(VIR_ERR_INTERNAL_ERROR,
>                         _("unexpected name value %d"), nameval);
> diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
> index 63a9e1c..8ee1dad 100644
> --- a/src/util/vircgroup.h
> +++ b/src/util/vircgroup.h
> @@ -56,6 +56,7 @@ typedef enum {
>      VIR_CGROUP_THREAD_VCPU = 0,
>      VIR_CGROUP_THREAD_EMULATOR,
>      VIR_CGROUP_THREAD_IOTHREAD,
> +    VIR_CGROUP_THREAD_GLOBAL,
>  
>      VIR_CGROUP_THREAD_LAST
>  } virCgroupThreadName;




More information about the libvir-list mailing list