All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chong Li <lichong659@gmail.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Chong Li <chong.li@wustl.edu>, Sisu Xi <xisisu@gmail.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	"dario.faggioli" <dario.faggioli@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel <xen-devel@lists.xen.org>,
	Ian Campbell <ian.campbell@eu.citrix.com>,
	Meng Xu <mengxu@cis.upenn.edu>,
	Dagaen Golomb <dgolomb@seas.upenn.edu>
Subject: Re: [PATCH v5 for Xen 4.7 3/4] libxl: enable per-VCPU parameter settings for RTDS scheduler
Date: Mon, 8 Feb 2016 16:59:46 -0600	[thread overview]
Message-ID: <CAGHO-iqPirGwh5xXu+WZo7QcdOhYw35PLFhJbN0=9sN4=Nz8=w@mail.gmail.com> (raw)
In-Reply-To: <20160208110717.GM23178@citrix.com>

On Mon, Feb 8, 2016 at 5:07 AM, Wei Liu <wei.liu2@citrix.com> wrote:
>
>
> [...]
> > >> +        num_vcpus = max_vcpuid + 1;
> > >> +        GCNEW_ARRAY(vcpus, num_vcpus);
> > >> +        if (sched_rtds_validate_params(gc, scinfo->vcpus[0].period,
> > >> +                                 scinfo->vcpus[0].budget,
> > >
> > > This doesn't make sense. You take this path because scinfo->num_vcpus is
> > > 0 but now you're dereferencing scinfo->vcpus[0]. Do I miss anything?
> > For commands like " xl sched-rtds -d vm1 -v all -p 1000 -b 1000"
> > (which sets all vcpus with
> > the same scheduling parameters), we pass the budget and period via
> > scinfo->vcpus[0].
> >
> > I'll add more explanation here.
>
> No, adding more explanation won't help.
>
> Let me explain a bit. Libxl is the library that can be used by multiple
> applications. Xl is just one of the applications. The other application
> that I know of is libvirt.
>
> So, the incarnation of a particular xl command is of no concern how we
> define the semantics of a libxl API. That is, you can come up with an
> unambiguous API but still support the same xl command.
>
> Currently the semantics of this (new?) libxl API seems to be broken,
> because you're (ab)using num_vcpus to represent a special case. In
> effect you can't really whether the array is empty. When num_vcpus is 0,
> you shouldn't dereference vcpus array, at all, because the semantics of
> num_vcpus == 0 is that the array is empty.
>
> Wei.

I see. I'll think about re-designing the data structure of
libxl_vcpu_sched_params.

Chong
>
> > >
> > >> +                                 &vcpus[0].s.rtds.period,
> > >> +                                 &vcpus[0].s.rtds.budget))
> > >
> >
> > --
> > Chong Li
> > Department of Computer Science and Engineering
> > Washington University in St.louis




-- 
Chong Li
Department of Computer Science and Engineering
Washington University in St.louis

  reply	other threads:[~2016-02-08 22:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 22:50 [PATCH v5 for Xen 4.7 0/4] Enable per-VCPU parameter settings for RTDS scheduler Chong Li
2016-02-04 22:50 ` [PATCH v5 for Xen 4.7 1/4] xen: enable " Chong Li
2016-02-09 18:17   ` Dario Faggioli
2016-03-01 17:58     ` Chong Li
2016-03-02 13:36       ` Jan Beulich
2016-03-02 14:06         ` George Dunlap
2016-02-04 22:50 ` [PATCH v5 for Xen 4.7 2/4] libxc: " Chong Li
2016-02-05 14:09   ` Wei Liu
2016-02-09 18:20     ` Dario Faggioli
2016-02-04 22:50 ` [PATCH v5 for Xen 4.7 3/4] libxl: " Chong Li
2016-02-05 14:44   ` Wei Liu
2016-02-05 15:59     ` Dario Faggioli
2016-02-05 16:19       ` Wei Liu
2016-02-06  0:10     ` Chong Li
2016-02-08 11:07       ` Wei Liu
2016-02-08 22:59         ` Chong Li [this message]
2016-02-09 10:19           ` Wei Liu
2016-02-09 11:05             ` Dario Faggioli
2016-02-09 12:00   ` Dario Faggioli
2016-02-09 16:48     ` Chong Li
2016-02-09 17:38     ` Wei Liu
2016-02-04 22:50 ` [PATCH v5 for Xen 4.7 4/4] xl: " Chong Li
2016-02-05 14:51   ` Wei Liu
2016-02-09 18:25     ` 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='CAGHO-iqPirGwh5xXu+WZo7QcdOhYw35PLFhJbN0=9sN4=Nz8=w@mail.gmail.com' \
    --to=lichong659@gmail.com \
    --cc=chong.li@wustl.edu \
    --cc=dario.faggioli@citrix.com \
    --cc=dgolomb@seas.upenn.edu \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@eu.citrix.com \
    --cc=ian.jackson@eu.citrix.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.