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

Re: [Xen-users] Call schedule set on arinc653 scheduler?



On 5/6/15, Mr Idris <mr@xxxxxxxxxxxx> wrote:
> On 5/6/15, Robert VanVossen <robert.vanvossen@xxxxxxxxxxxxxxx> wrote:
>>
>>
>> On 5/6/2015 9:18 AM, Ian Campbell wrote:
>>> On Wed, 2015-05-06 at 15:06 +0200, Mr Idris wrote:
>>>> I'm using xen 4.4.1 with arinc653 scheduler. dom0 runs well, but i
>>>> can't run domU. On wiki page, it is said that to usage arinc653
>>>> scheduler (http://wiki.xen.org/wiki/ARINC653_Scheduler) point no.5,
>>>> "call the arinc653_schedule_set API with an ARINC653 scheduler
>>>> structure"
>>>>
>>>> How do i call this?
>>>
>>> It is a function in libxenctrl.so
>>>
>>>>  What command should i do?
>>>
>>> I'm afraid it looks like there is no tool which actually calls it. I
>>> think you might have to write a little main.c.
>>>
>>> In fact, I see now that there are example programs on the wiki page you
>>> linked to.
>>>
>> That is correct. You should be able to follow the idea behind the
>> examples,
>> but
>> you need to configure any values for your specific domains and schedule.
>>
>
> Thanks for the reply but i still don't get it. I tried to compile the
> examples, but i got some errors.
>
> I know i have to provide UUID that i get from xenstore-ls. Should i
> include in config file also or when i call this schedule_set?
>
> Regards,
> Idris
>
I write small program to call arinc653, it gives me no error when i
compiled with parameter -lxenctrl and -luuid. When i run it, it works
fine like i set variable to xc_sched_xfair_schedule_set(xci, 0,
&sched); and when it's correct will give true. But still when i check
'xl list' still no state running on VM.

Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  6258     1     r-----     370.1
Debian                                       3   512     1     ------       0.0

Here is the arinc653_schedule_set

#include <stdio.h>
#include <xenctrl.h>
#include <uuid/uuid.h>

int main()
{
        struct xen_sysctl_arinc653_schedule sched;
        xc_interface *xci = xc_interface_open(NULL, NULL, 0);
        int i;

        /* initialize major frame and number of minor frames */
        sched.major_frame = 0;
        sched.num_sched_entries = 2;

        uuid_parse("", sched.sched_entries[0].dom_handle);
        sched.sched_entries[0].vcpu_id = 0;
        sched.sched_entries[0].runtime = 10;
        sched.major_frame += sched.sched_entries[0].runtime;

        uuid_parse("938b9c5b-8d9d-402a-9be0-0e0cc4cf67dc",
sched.sched_entries[1].dom_handle);
        sched.sched_entries[1].vcpu_id = 0;
        sched.sched_entries[1].runtime = 10;
        sched.major_frame += sched.sched_entries[1].runtime;

        i = xc_sched_arinc653_schedule_set(xci, 0, &sched);
        if (i)
        {
                printf("true\n");
        } else {
                printf("false\n");
        }
        return 0;
}

interestingly when i run this program suddenly the dom0 hang but when
i make num_sched_entries bigger than 2, it runs and give me true
message.

Does anyone have any idea what change I need to make to get the scheduler to run
the VM?  I appreciate the help.

Thanks,
Idris

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.