[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
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. :-) -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |