All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Chong Li <lichong659@gmail.com>
Cc: Chong Li <chong.li@wustl.edu>,
	wei.liu2@citrix.com, Sisu Xi <xisisu@gmail.com>,
	george.dunlap@eu.citrix.com, xen-devel@lists.xen.org,
	mengxu@cis.upenn.edu, dgolomb@seas.upenn.edu
Subject: Re: [PATCH v2 for Xen 4.6 4/4] xl: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler
Date: Mon, 8 Jun 2015 18:21:13 +0200	[thread overview]
Message-ID: <1433780473.2403.37.camel@citrix.com> (raw)
In-Reply-To: <1432599084-20956-1-git-send-email-chong.li@wustl.edu>


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

On Mon, 2015-05-25 at 19:11 -0500, Chong Li wrote:
> Change main_sched_rtds and related output functions to support per-VCPU settings
> for xl sched-rtds tool.
> 
> Signed-off-by: Chong Li <chong.li@wustl.edu>
> Signed-off-by: Meng Xu <mengxu@cis.upenn.edu>
> Signed-off-by: Sisu Xi <xisisu@gmail.com>
> ---
>  tools/libxl/xl_cmdimpl.c | 261 +++++++++++++++++++++++++++++++++++++++++------
>  1 file changed, 230 insertions(+), 31 deletions(-)
> 
You must be changing tools/libxl/xl_cmdtable.c as well, or new options
won't work (at least they won't show up in the command's help).

> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c

> @@ -6120,76 +6186,209 @@ int main_sched_rtds(int argc, char **argv)
>  {
>      const char *dom = NULL;
>      const char *cpupool = NULL;
> -    int period = 0; /* period is in microsecond */
> -    int budget = 0; /* budget is in microsecond */
> +
> +    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 vcpus_size = 1; /* size of vcpus array */
> +    int periods_size = 1; /* size of periods array */
> +    int budgets_size = 1; /* size of budgets array */
> +    int input_size = 0; /* number of the input param set (v, p, b) */
> +    bool flag_b = false;
> +    bool flag_p = false;
> +    bool flag_v = false;
>      bool opt_p = false;
>      bool opt_b = false;
> -    int opt, rc;
> +    bool opt_v = false;
> +    bool opt_o = false; /* get per-domain info instead of per-vcpu info */
> +    int opt, i;
> +    int rc = 0;
>      static struct option opts[] = {
>          {"domain", 1, 0, 'd'},
>          {"period", 1, 0, 'p'},
>          {"budget", 1, 0, 'b'},
> +        {"vcpu",1, 0, 'v'},
>          {"cpupool", 1, 0, 'c'},
> +        {"output", 1, 0, 'o'},
>          COMMON_LONG_OPTS,
>          {0, 0, 0, 0}
>      };
>
I don't like "-o/--output" as the name of the config switch for this.

Also, what is the semantic of passing -o, in case one has given
different parameters to each vcpus? What would the command print in that
case?

I think that, while it makes sense to have the interface in place for
the setting part, as a shortcut of setting all the parameters of all the
vcpus to the same values, for the getting and printing side of things,
it make much less sense.

I appreciate just now that this probably affect other bits of the
interface, as well as other interfaces, and I think we should handle it
consistently...

What do you think?
For example (although this belong to patch 3's review) what
libxl_domain_sched_params_get() does in the case I jus described?

Regards,
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: 181 bytes --]

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

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

  parent reply	other threads:[~2015-06-08 16:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26  0:11 [PATCH v2 for Xen 4.6 4/4] xl: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler Chong Li
2015-06-05 11:38 ` Ian Campbell
2015-06-08 16:21 ` Dario Faggioli [this message]
2015-06-08 21:18   ` Chong Li
2015-06-09  8:01     ` Dario Faggioli
2015-06-09 15:12       ` Chong Li
2015-06-09 15:53         ` Dario Faggioli

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=1433780473.2403.37.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=chong.li@wustl.edu \
    --cc=dgolomb@seas.upenn.edu \
    --cc=george.dunlap@eu.citrix.com \
    --cc=lichong659@gmail.com \
    --cc=mengxu@cis.upenn.edu \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xisisu@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.