All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Meng Xu <mengxu@cis.upenn.edu>, xen-devel@lists.xenproject.org
Cc: george.dunlap@eu.citrix.com, wei.liu2@citrix.com,
	xumengpanda@gmail.com, ian.jackson@eu.citrix.com
Subject: Re: [PATCH RFC v1 3/3] xl: enable per-VCPU work conserving flag for RTDS
Date: Thu, 3 Aug 2017 18:03:38 +0200	[thread overview]
Message-ID: <1501776218.28477.12.camel@citrix.com> (raw)
In-Reply-To: <1501612434-5803-4-git-send-email-mengxu@cis.upenn.edu>


[-- Attachment #1.1: Type: text/plain, Size: 3105 bytes --]

On Tue, 2017-08-01 at 14:33 -0400, Meng Xu wrote:
> --- a/tools/xl/xl_cmdtable.c
> +++ b/tools/xl/xl_cmdtable.c
> @@ -272,12 +272,13 @@ struct cmd_spec cmd_table[] = {
>      { "sched-rtds",
>        &main_sched_rtds, 0, 1,
>        "Get/set rtds scheduler parameters",
> -      "[-d <Domain> [-v[=VCPUID/all]] [-p[=PERIOD]] [-b[=BUDGET]]]",
> +      "[-d <Domain> [-v[=VCPUID/all]] [-p[=PERIOD]] [-b[=BUDGET]]]
> [-w[=WORKCONSERVING]]",
>        "-d DOMAIN, --domain=DOMAIN     Domain to modify\n"
>        "-v VCPUID/all, --vcpuid=VCPUID/all    VCPU to modify or
> output;\n"
>        "               Using '-v all' to modify/output all vcpus\n"
>        "-p PERIOD, --period=PERIOD     Period (us)\n"
>        "-b BUDGET, --budget=BUDGET     Budget (us)\n"
> +      "-w WORKCONSERVING, --
> workconserving=WORKCONSERVING    WORKCONSERVING (1=yes,0=no)\n"
>
Does this really need to accept a 1 or 0 parameter? Can't it be that,
if -w is provided, the vCPU is marked as work-conserving, if it's not,
it's considered reservation only.

> --- a/tools/xl/xl_sched.c
> +++ b/tools/xl/xl_sched.c
> 
> @@ -279,8 +280,8 @@ static int sched_rtds_vcpu_output(int domid,
> libxl_vcpu_sched_params *scinfo)
>      int i;
>  
>      if (domid < 0) {
> -        printf("%-33s %4s %4s %9s %9s\n", "Name", "ID",
> -               "VCPU", "Period", "Budget");
> +        printf("%-33s %4s %4s %9s %9s %15s\n", "Name", "ID",
> +               "VCPU", "Period", "Budget", "Work conserving");
>          return 0;
>      }
>  
> @@ -290,12 +291,13 @@ static int sched_rtds_vcpu_output(int domid,
> libxl_vcpu_sched_params *scinfo)
>  
>      domname = libxl_domid_to_name(ctx, domid);
>      for ( i = 0; i < scinfo->num_vcpus; i++ ) {
> -        printf("%-33s %4d %4d %9"PRIu32" %9"PRIu32"\n",
> +        printf("%-33s %4d %4d %9"PRIu32" %9"PRIu32" %15d\n",
>
As far as printing it goes, OTOH, I would indeed print a string, i.e.,
"yes", if the field is found to be 1 (true), or "no", if the field is
found to be 0 (false).

> @@ -702,14 +705,18 @@ int main_sched_rtds(int argc, char **argv)
>      int *vcpus = (int *)xmalloc(sizeof(int)); /* IDs of VCPUs that
> change */
>      int *periods = (int *)xmalloc(sizeof(int)); /* period is in
> microsecond */
>      int *budgets = (int *)xmalloc(sizeof(int)); /* budget is in
> microsecond */
> +    int *workconservings = (int *)xmalloc(sizeof(int)); /* budget is
> in microsecond */
>
Yeah, budget is in microseconds. But this is not budget! :-P

In fact (jokes apart), it can be just a bool, can't it?

Regadrs,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

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

  reply	other threads:[~2017-08-03 16:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 18:33 [PATCH RFC v1 0/3] Enable XL to set and get per-VCPU work conserving flag for RTDS scheduler Meng Xu
2017-08-01 18:33 ` [PATCH RFC v1 1/3] xen:rtds: enable XL to set and get vcpu work conserving flag Meng Xu
2017-08-03 15:47   ` Dario Faggioli
2017-08-03 15:53     ` Meng Xu
2017-08-01 18:33 ` [PATCH RFC v1 2/3] libxl: enable per-VCPU work conserving flag for RTDS Meng Xu
2017-08-03 15:53   ` Dario Faggioli
2017-08-03 21:39     ` Meng Xu
2017-08-04  8:13       ` Dario Faggioli
2017-08-04 12:10         ` Wei Liu
2017-08-04 12:53           ` Dario Faggioli
2017-08-04 14:34             ` Wei Liu
2017-08-04 20:47               ` Dario Faggioli
2017-08-04 21:01               ` Meng Xu
2017-08-04 12:10   ` Wei Liu
2017-08-01 18:33 ` [PATCH RFC v1 3/3] xl: " Meng Xu
2017-08-03 16:03   ` Dario Faggioli [this message]
2017-08-03 22:02     ` Meng Xu
2017-08-04  9:01       ` Dario Faggioli
2017-08-04 20:56         ` Meng Xu
2017-08-01 19:08 ` [PATCH RFC v1 0/3] Enable XL to set and get per-VCPU work conserving flag for RTDS scheduler Meng Xu
2017-08-02 17:49 ` Dario Faggioli
2017-08-03  2:33   ` Meng Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1501776218.28477.12.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=mengxu@cis.upenn.edu \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xumengpanda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.