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

Re: [Xen-devel] [PATCH v1 4/4] xl: introduce rt scheduler



I know most of the code is copied from existing code, so I only
commented on some nits I found.

On Sun, Aug 24, 2014 at 06:58:45PM -0400, Meng Xu wrote:
[...]
>  =head1 CPUPOOLS COMMANDS
> diff --git a/tools/libxl/xl.h b/tools/libxl/xl.h
> index 10a2e66..51b634a 100644
> --- a/tools/libxl/xl.h
> +++ b/tools/libxl/xl.h
> @@ -67,6 +67,7 @@ int main_memset(int argc, char **argv);
>  int main_sched_credit(int argc, char **argv);
>  int main_sched_credit2(int argc, char **argv);
>  int main_sched_sedf(int argc, char **argv);
> +int main_sched_rt(int argc, char **argv);
>  int main_domid(int argc, char **argv);
>  int main_domname(int argc, char **argv);
>  int main_rename(int argc, char **argv);
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index f1c136a..22f7f9a 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -5175,6 +5175,52 @@ static int sched_sedf_domain_output(
>      return 0;
>  }
>  
> +
> +static int sched_rt_domain_output(
> +    int domid)

Join this line to previous line please.

> +{
> +    char *domname;
> +    libxl_domain_sched_params scinfo;
> +    int rc = 0, i;
> +
> +    if (domid < 0) {
> +        printf("%-33s %4s %4s %9s %9s\n", "Name", "ID", "VCPU", "Period", 
> "Budget");
> +        return 0;
> +    }
> +
> +    libxl_domain_sched_params_init(&scinfo);
> +    rc = sched_domain_get(LIBXL_SCHEDULER_RT, domid, &scinfo);
> +    if (rc)
> +        goto out;
> +
> +    domname = libxl_domid_to_name(ctx, domid);
> +    for( i = 0; i < scinfo.rt.num_vcpus; i++ )
> +    {

Spaces and coding style.

Note that toolstack coding style is different from hypervisor coding
style.

> +        printf("%-33s %4d %4d %9"PRIu64" %9"PRIu64"\n",
> +            domname,
> +            domid,
> +            scinfo.rt.vcpus[i].index,
> +            scinfo.rt.vcpus[i].period,
> +            scinfo.rt.vcpus[i].budget);
> +    }
> +    free(domname);
> +
> +out:
> +    libxl_domain_sched_params_dispose(&scinfo);
> +    return rc;
> +}
> +
[...]
> +
> +    if (cpupool && (dom || opt_p || opt_b || opt_v)) {
> +        fprintf(stderr, "Specifying a cpupool is not allowed with other 
> options.\n");

Line too long.

Wei.

_______________________________________________
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®.