|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC v2 1/4] xen: add real time scheduler rt
>>> On 29.07.14 at 03:52, <mengxu@xxxxxxxxxxxxx> wrote:
> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -68,6 +68,7 @@ static const struct scheduler *schedulers[] = {
> &sched_sedf_def,
> &sched_credit_def,
> &sched_credit2_def,
> + &sched_rt_def,
> &sched_arinc653_def,
> };
Is the insertion as other than last item (as one would expect for a
new addition) intentional? Not that I think this matters much, but
I'm still curious.
> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -339,6 +339,18 @@ struct xen_domctl_max_vcpus {
> typedef struct xen_domctl_max_vcpus xen_domctl_max_vcpus_t;
> DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_vcpus_t);
>
> +/*
> + * This structure is used to pass to rt scheduler from a
> + * privileged domain to Xen
> + */
> +struct xen_domctl_sched_rt_params {
> + /* get vcpus' info */
> + int64_t period; /* s_time_t type */
> + int64_t budget;
> + int index;
Are all these really meaningfully signed quantities?
Also, you need to pad the structure to a multiple of 8 bytes, or
its layout will differ between 32- and 64-bit (tool stack) callers.
> @@ -367,6 +382,15 @@ struct xen_domctl_scheduler_op {
> struct xen_domctl_sched_credit2 {
> uint16_t weight;
> } credit2;
> + struct xen_domctl_sched_rt{
> + /* get vcpus' params */
> + XEN_GUEST_HANDLE_64(xen_domctl_sched_rt_params_t) vcpu;
> + uint16_t nr_vcpus;
> + /* set one vcpu's params */
> + uint16_t vcpu_index;
> + int64_t period;
> + int64_t budget;
> + } rt;
Mostly the same comments here, just that the padding here needs to
go in the middle.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |