[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 for Xen 4.6 1/4] xen: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler
On Tue, May 26, 2015 at 12:18 PM, Chong Li <lichong659@xxxxxxxxx> wrote: > On Tue, May 26, 2015 at 4:08 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote: >>>>> On 26.05.15 at 02:05, <lichong659@xxxxxxxxx> wrote: >>> Add two hypercalls(XEN_DOMCTL_SCHEDOP_getvcpuinfo/putvcpuinfo) to get/set a >>> domain's >>> per-VCPU parameters. Hypercalls are handled by newly added hook >>> (.adjust_vcpu) in the >>> scheduler interface. >>> >>> Add a new data structure (struct xen_domctl_scheduler_vcpu_op) for >>> transferring data >>> between tool and hypervisor. >>> >>> Signed-off-by: Chong Li <chong.li@xxxxxxxxx> >>> Signed-off-by: Meng Xu <mengxu@xxxxxxxxxxxxx> >>> Signed-off-by: Sisu Xi <xisisu@xxxxxxxxx> >>> --- >> >> Missing brief description of changes in v2 here. > > Based on Dario's suggestion in PATCH v1, we think it would be better > to make the per-vcpu get/set functionalities more general, rather than > just serving for rtds scheduler. So, the changes in v2 are: > > 1) Add a new hypercall, XEN_DOMCTL_scheduler_vcpu_op. Any scheduler > can use it for per-vcpu get/set. There is a new data structure (struct > xen_domctl_scheduler_vcpu_op), which helps transferring data (per-vcpu > params) between tool and hypervisor when the hypercall is invoked. > > 2) The new hypercall is handled by function sched_adjust_vcpu (in > schedule.c), which would call a newly added hook (named as > .adjust_vcpu, added to the scheduler interface (struct scheduler)). > > 3) In RTDS scheduler, .adjust_vcpu hooks a function defined in > sched_rt.c, named as rt_vcpu_cntl. This function gets/sets the > per-vcpu params. > > >> >>> --- a/xen/common/schedule.c >>> +++ b/xen/common/schedule.c >>> @@ -1104,6 +1104,30 @@ long sched_adjust(struct domain *d, struct >>> xen_domctl_scheduler_op *op) >>> return ret; >>> } >>> >>> +/* Adjust scheduling parameter for the vcpus of a given domain. */ >>> +long sched_adjust_vcpu( >>> + struct domain *d, >>> + struct xen_domctl_scheduler_vcpu_op *op) >>> +{ >>> + long ret; >> >> I see no reason for this and the function return type to be "long". > > The reason is stated in the begining. Sorry for missing some details in the last reply. sched_adjust_vcpu is added here because I need a seperate function to handle XEN_DOMCTL_scheduler_vcpu_op, which is a new hypercall dedicated for per-vcpu get/set. This function is actually based on sched_adjust (which is dedicated for per-dom get/set in rtds), so the return type is also the same. > >> >> Jan >> > > Best, > Chong > > -- > 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |