From mboxrd@z Thu Jan 1 00:00:00 1970 From: Meng Xu Subject: Re: [PATCH v1 1/4] xen: add real time scheduler rt Date: Wed, 3 Sep 2014 10:35:48 -0400 Message-ID: References: <1408921125-21470-1-git-send-email-mengxu@cis.upenn.edu> <1408921125-21470-2-git-send-email-mengxu@cis.upenn.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6474999773973048555==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Ian Campbell , Sisu Xi , Stefano Stabellini , Chenyang Lu , Dario Faggioli , Ian Jackson , "xen-devel@lists.xen.org" , Linh Thi Xuan Phan , Meng Xu , Jan Beulich , Chao Wang , Chong Li , Dagaen Golomb List-Id: xen-devel@lists.xenproject.org --===============6474999773973048555== Content-Type: multipart/alternative; boundary=047d7b2e4e3ef24c6505022a2648 --047d7b2e4e3ef24c6505022a2648 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi George, 2014-09-03 10:15 GMT-04:00 George Dunlap : > On Wed, Sep 3, 2014 at 3:11 PM, Meng Xu wrote: > >> > diff --git a/xen/common/schedule.c b/xen/common/schedule.c > >> > index 55503e0..7d2c6d1 100644 > >> > --- a/xen/common/schedule.c > >> > +++ b/xen/common/schedule.c > >> > @@ -69,6 +69,7 @@ static const struct scheduler *schedulers[] =3D { > >> > &sched_credit_def, > >> > &sched_credit2_def, > >> > &sched_arinc653_def, > >> > + &sched_rt_def, > >> > }; > >> > > >> > static struct scheduler __read_mostly ops; > >> > @@ -1090,7 +1091,8 @@ long sched_adjust(struct domain *d, struct > >> > xen_domctl_scheduler_op *op) > >> > > >> > if ( (op->sched_id !=3D DOM2OP(d)->sched_id) || > >> > ((op->cmd !=3D XEN_DOMCTL_SCHEDOP_putinfo) && > >> > - (op->cmd !=3D XEN_DOMCTL_SCHEDOP_getinfo)) ) > >> > + (op->cmd !=3D XEN_DOMCTL_SCHEDOP_getinfo) && > >> > + (op->cmd !=3D XEN_DOMCTL_SCHEDOP_getnumvcpus)) ) > >> > >> Why are you introducing this as a schedop? Isn't this information > >> already exposed in getdomaininfo? > > > > > > I introduce XEN_DOMCTL_SCHEDOP_getnumvcpus as a schedop because we need > to > > know the number of vcpus a domain has when the tool stack wants to > display > > the parameters of EACH vcpu. > > > > I think the operation you meant in getdomaininfo is XEN_DOMCTL_max_vcpu= s > (in > > file xen/common/domctl.c)? > > No, the operation I had in mind was XEN_DOMCTL_getdomaininfo, which > will give you nr_online_vcpus. > > > When the tool stack (command xl sched-rt -d domain) displays the > parameters > > of EACH vcpu, the tool stack will allocate an array whose size is > > "sizeof(struct xen_domctl_sched_rt_params) * num_vcpus_of_this_domain" > and > > bounce this array to the hypervisor. After hypervisor fills out the > > parameters of each vcpu, this array will be bounced out to tool stack t= o > > display to users. > > Sure, there are lots of operations the toolstack wants that needs the > number of vcpus, which is why it's already exposed with > XEN_DOMCTL_getdomaininfo. :-) =E2=80=8BI see. Thank you very much for your information and advice! It's r= eally useful! I will remove the =E2=80=8B XEN_DOMCTL_max_vcpus =E2=80=8B from schedop and use =E2=80=8B XEN_DOMCTL_getdomaininfo =E2=80=8B to get the number of vcpus instead! :-)=E2=80=8B =E2=80=8BBest, Meng ----------- Meng Xu PhD Student in Computer and Information Science University of Pennsylvania --047d7b2e4e3ef24c6505022a2648 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi = George,


= 2014-09-03 10:15 GMT-04:00 George Dunlap <George.Dunlap@eu.citri= x.com>:
On Wed, Sep 3, 2014 at 3:11 PM, Meng Xu &l= t;xumengpanda@gmail.com> wr= ote:
>> > diff --git a/xen/common/schedule.c b/xen/common/schedule.c >> > index 55503e0..7d2c6d1 100644
>> > --- a/xen/common/schedule.c
>> > +++ b/xen/common/schedule.c
>> > @@ -69,6 +69,7 @@ static const struct scheduler *schedulers[]= =3D {
>> >=C2=A0 =C2=A0 =C2=A0 &sched_credit_def,
>> >=C2=A0 =C2=A0 =C2=A0 &sched_credit2_def,
>> >=C2=A0 =C2=A0 =C2=A0 &sched_arinc653_def,
>> > +=C2=A0 =C2=A0 &sched_rt_def,
>> >=C2=A0 };
>> >
>> >=C2=A0 static struct scheduler __read_mostly ops;
>> > @@ -1090,7 +1091,8 @@ long sched_adjust(struct domain *d, str= uct
>> > xen_domctl_scheduler_op *op)
>> >
>> >=C2=A0 =C2=A0 =C2=A0 if ( (op->sched_id !=3D DOM2OP(d)->= sched_id) ||
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((op->cmd !=3D XEN= _DOMCTL_SCHEDOP_putinfo) &&
>> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (op->cmd !=3D XEN_DOMC= TL_SCHEDOP_getinfo)) )
>> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (op->cmd !=3D XEN_DOMC= TL_SCHEDOP_getinfo) &&
>> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (op->cmd !=3D XEN_DOMC= TL_SCHEDOP_getnumvcpus)) )
>>
>> Why are you introducing this as a schedop?=C2=A0 Isn't this in= formation
>> already exposed in getdomaininfo?
>
>
> I introduce XEN_DOMCTL_SCHEDOP_getnumvcpus as a schedop because = we need to
> know the number of vcpus a domain has when the tool stack wants to dis= play
> the parameters of EACH vcpu.
>
> I think the operation you meant in getdomaininfo is XEN_DOMCTL_max_vcp= us (in
> file xen/common/domctl.c)?

No, the operation I had in mind was XEN_DOMCTL_getdomaininfo, which
will give you nr_online_vcpus.

> When the tool stack (command xl sched-rt -d domain) displays the param= eters
> of EACH vcpu, the tool stack will allocate an array whose size is
> "sizeof(struct xen_domctl_sched_rt_params) * num_vcpus_of_this_do= main" and
> bounce this array to the hypervisor. After hypervisor fills out the > parameters of each vcpu, this array will be bounced out to tool stack = to
> display to users.

Sure, there are lots of operations the toolstack wants that needs the
number of vcpus, which is why it's already exposed with
XEN_DOMCTL_getdomaininfo. :-)

=E2=80=8BI see. Th= ank you very much for your information and advice! It's really useful!<= /div>
=
I will remove the =E2=80=8B
=C2=A0XEN_DOMCTL_max_vcpus=
=E2=80=8B from schedop and use =E2=80=8B
XEN_DOMCTL_getdomaininfo
=E2=80=8B = to get the number of vcpus instead! :-)=E2=80=8B

=E2=80=8BBest,
=
Meng
=

-----------
Meng Xu
PhD Student in Compute= r and Information Science
University of Pennsylvania
--047d7b2e4e3ef24c6505022a2648-- --===============6474999773973048555== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============6474999773973048555==--