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

Re: [Xen-devel] [PATCH v8 6/6] tools: enable Cache QoS Monitoring feature for libxl/libxc



On Sat, 2014-02-08 at 13:07 +0800, Dongxiao Xu wrote:
> Introduced two new xl commands to attach/detach CQM service for a guest
> $ xl pqos-attach cqm domid
> $ xl pqos-detach cqm domid
> 
> Introduce one new xl command to retrive guest CQM information

"retrieve"

> $ xl pqos-list cqm

Please patch the xl manpages to describe all these new commands.

I wonder though -- are these aimed at end users or are they really for
developer use? I'm wondering if they should be exposed this way or
whether they should be exposed by some lower level tool (similar to how
xenpm is separate). I don't know what the correct answer is here.

> +int xc_domain_getcqminfo(xc_interface *xch, xc_cqminfo_t *info)
> +{
> +    int ret = 0;
> +    DECLARE_SYSCTL;
> +
> +    sysctl.cmd = XEN_SYSCTL_getcqminfo;
> +    if ( xc_sysctl(xch, &sysctl) < 0 )
> +        ret = -1;

xc_sysctl returns -1 on error AFAICT. So:
        ret = xc_sysctl(...);
        if (ret >= 0)
        {
                info->etc
        }
        return ret;

> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> index 649ce50..43c0f48 100644
> --- a/tools/libxl/libxl_types.idl
> +++ b/tools/libxl/libxl_types.idl
> @@ -596,3 +596,10 @@ libxl_event = Struct("event",[
>                                   ])),
>             ("domain_create_console_available", Struct(None, [])),
>             ]))])
> +
> +libxl_cqminfo = Struct("cqminfo", [

You need to also patch libxl.h to add a suitable LIBXL_HAVE_FOO define,
see the existing examples in that header.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.