From: "Simon Martin" <smartin@milliways.cl>
To: Robbie VanVossen <robert.vanvossen@dornerworks.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Dario Faggioli <dario.faggioli@citrix.com>,
josh.whitehead@dornerworks.com,
Nate Studer <nate.studer@dornerworks.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: ARINC653
Date: Tue, 03 Dec 2013 12:07:18 +0000 [thread overview]
Message-ID: <emd0ee9d80-dcd1-44d3-86ac-d976b80e30bc@smartin-alien> (raw)
In-Reply-To: <528A34C9.7010208@dornerworks.com>
[-- Attachment #1.1: Type: text/plain, Size: 1317 bytes --]
Hi Robbie,
Nate said that I should contact you if I was having problems with the
scheduler, and unfortunately I have.
As far as I can see I have created a cpupool with 1 CPU running the
arinc653 scheduler. Here the output from xl.
root@smartin-xen:~# xl cpupool-list
Name CPUs Sched Active Domain count
Pool-0 3 credit y 1
pv400 1 arinc653 y 1
However the domU I load into the pv400 cpupool is never scheduled. I
found a few mails talking about this, and it looks like I need to run a
program on dom0 to configure the scheduler. I wrote the program and as
far as I can see it should work, however whatever I do it fails. I tried
to put a few printk statements in the corresponding arinc653_sched_set
but I don't see any output in the xl dmesg, or domU log either.
I attach the code I wrote to configure the scheduler. It accepts one
parameter, the UUID of the dom_handle I need to specify. The mail I
found wasn't too clear so I test this using the dom0 UUID
(00000000-0000-0000-0000-000000000000) and with the domU UUID as well.
Both fail the do_sysctl call in xc_sched_arinc653_schedule_set
(xc_arinc653.c line 51).
Can you give me some idea of what I'm doing wrong here?
Regards.
[-- Attachment #1.2: Type: text/html, Size: 2624 bytes --]
[-- Attachment #2: arinc653.c --]
[-- Type: text/plain, Size: 3486 bytes --]
/* ********************************************************************
* Project :
* Author : smartin
********************************************************************
Modifications:
0.01 29/11/2013 Initial version.
*/
/*---------------------------------------------------------------------
-- macros (preamble)
---------------------------------------------------------------------*/
/*---------------------------------------------------------------------
-- standard includes
---------------------------------------------------------------------*/
#include <stdio.h>
#include <xenctrl.h>
#include <uuid/uuid.h>
/*---------------------------------------------------------------------
-- project includes (import)
---------------------------------------------------------------------*/
/*---------------------------------------------------------------------
-- project includes (export)
---------------------------------------------------------------------*/
/*---------------------------------------------------------------------
-- macros (postamble)
---------------------------------------------------------------------*/
/*---------------------------------------------------------------------
-- data types
---------------------------------------------------------------------*/
/*---------------------------------------------------------------------
-- function prototypes
---------------------------------------------------------------------*/
/*---------------------------------------------------------------------
-- global variables
---------------------------------------------------------------------*/
/*---------------------------------------------------------------------
-- local variables
---------------------------------------------------------------------*/
/*---------------------------------------------------------------------
-- private functions
---------------------------------------------------------------------*/
/*---------------------------------------------------------------------
-- public functions
---------------------------------------------------------------------*/
int main(int argc, char *argv[], char *envp[])
{
// check for parameters
if (argc < 2)
{
printf("%s <dom uuid>\n", argv[0]);
return -1;
}
printf("scheduling %s\n", argv[1]);
// get the xen control interface
xc_interface *xci = xc_interface_open(NULL, NULL, 0);
if (!xci)
{
printf("error opening xen control interface\n");
return -1;
}
/* initialize major frame and number of minor frames */
struct xen_sysctl_arinc653_schedule sched = {0};
sched.major_frame = 0;
sched.num_sched_entries = 1;
// initialise frames
int i;
for (i = 0; i < sched.num_sched_entries; ++i)
{
/* identify domain by UUID */
if (uuid_parse(argv[1], sched.sched_entries[i].dom_handle))
{
printf("error parsing uuid %s\n", argv[1]);
return -1;
}
/* must be 0 */
sched.sched_entries[i].vcpu_id = 0;
/* runtime in ms */
sched.sched_entries[i].runtime = 1;
/* updated major frame time */
sched.major_frame += sched.sched_entries[i].runtime;
}
i = xc_sched_arinc653_schedule_set(xci, &sched);
if (i)
{
printf("error %i setting scheduler data\n", i);
return -1;
}
return 0;
}
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next parent reply other threads:[~2013-12-03 12:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <528A34C9.7010208@dornerworks.com>
2013-12-03 12:07 ` Simon Martin [this message]
2013-12-03 15:32 ` ARINC653 Nate Studer
2013-12-03 20:19 ` ARINC653 Simon Martin
2013-12-09 20:23 ` ARINC653 Simon Martin
2013-12-09 21:28 ` ARINC653 Dario Faggioli
2013-12-09 23:08 ` ARINC653 Simon Martin
2013-12-10 9:36 ` ARINC653 Dario Faggioli
2013-12-10 11:55 ` ARINC653 Simon Martin
2013-11-28 13:07 ARINC653 Simon Martin
2013-11-28 13:55 ` ARINC653 Simon Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=emd0ee9d80-dcd1-44d3-86ac-d976b80e30bc@smartin-alien \
--to=smartin@milliways.cl \
--cc=andrew.cooper3@citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=josh.whitehead@dornerworks.com \
--cc=nate.studer@dornerworks.com \
--cc=robert.vanvossen@dornerworks.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).