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

Re: [Xen-devel] [PATCH v1 1/4] xen: add real time scheduler rt



Hi George,


2014-09-03 10:15 GMT-04:00 George Dunlap <George.Dunlap@xxxxxxxxxxxxx>:
On Wed, Sep 3, 2014 at 3:11 PM, Meng Xu <xumengpanda@xxxxxxxxx> 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[] = {
>> >Â Â Â &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 != DOM2OP(d)->sched_id) ||
>> >Â Â Â Â Â Â((op->cmd != XEN_DOMCTL_SCHEDOP_putinfo) &&
>> > -Â Â Â Â Â (op->cmd != XEN_DOMCTL_SCHEDOP_getinfo)) )
>> > +Â Â Â Â Â (op->cmd != XEN_DOMCTL_SCHEDOP_getinfo) &&
>> > +Â Â Â Â Â (op->cmd != 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_vcpus (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 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. :-)

âI see. Thank you very much for your information and advice! It's really useful!

I will remove the â
ÂXEN_DOMCTL_max_vcpus
â from schedop and use â
XEN_DOMCTL_getdomaininfo
â to get the number of vcpus instead! :-)â

âBest,

Meng

-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
_______________________________________________
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®.