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

Re: [Xen-devel] VCPUOP_set_periodic_timer



Thanks Andrew,
 
I've tried to load the arinc653 scheduler, however Xen crashes whenever I create a CPU pool with this scheduler. I reported this and it was confirmed by Seeing as I've been fighting to get my little port up, running and communicating via shared pages with a Windows domU I've kind of ignored this. However before I go and invest more time and effort with this I just wanted to confirm that I'm not barking up the wrong tree.
 
Regards.
 
------ Original Message ------
From: "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>
To: "Simon Martin" <smartin@xxxxxxxxxxxx>
Cc: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
Sent: 15/11/2013 08:41:44
Subject: Re: [Xen-devel] VCPUOP_set_periodic_timer
 
On 15/11/13 11:24, Simon Martin wrote:
Hi Andrew,
 
The operating system I am trying to port to Xen is an industrial servo controller. We are currently running at 125 microsecond servo update rate on our bespoke hardware (at the moment MIPS64 and ARM) (hence the 125 microsecond ideal interrupt period). We will be driving EtherCAT servo drives that need to be updated at 500 microseconds (hence at least 500 microsecond interrupt period). If we can achieve this on a single core ARM11 clocked at 532 MHz, it must be achievable on PC hardware. As I said before the idea is to dedicate a CPU core to this with all other functions running on the other cores.
 
Luckily we can accept a reasonable amount of jitter on the EtherCAT network as we can hand over clock synchronisation to a slave. This gives us a little leeway.
 
Regards.
 
 

It certainly is achievable on PC hardware, but not under the standard assumptions in virtualisation.  You want to use VCPUOP_set_singleshot_timer, but be aware than there are still no normal guarantees that your domain vcpu will be run when the timer expires; the credit scheduler will pick the highest priority vcpu to run, which might not be the one which is expecting a timer interrupt.

You should investigate using the arinc653 scheduler in Xen, which is a realtime scheduler, and might be more appropriate for your usecase.

~Andrew


------ Original Message ------
From: "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>
Sent: 14/11/2013 18:39:21
Subject: Re: [Xen-devel] VCPUOP_set_periodic_timer
 
On 14/11/2013 21:18, Simon Martin wrote:
Hi all,
 
I need a periodic timer running at ideally at 125 microseconds and at least 500 microseconds. I've just found the VCPUOP_set_periodic_timer, however there is a comment saying "periods less than one millisecond may not be supported".
 
I will be running on an x64 machine. Is this supported? If not, is there any alternate means of generating a fast interrupt?
 
Regards.

What is the usecase here?  125us is very short indeed.  Xen certainly cant guarantee anything more accurate than 50us.  Unless the affected vcpu is running uncontested on the hardware, there is very little chance that the vcpu will indeed be woken up again in 125us.

It sounds as if you are looking for some pseudo realtime system, at which point you might want to consider a different scheduler.

~Andrew


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

 


Rackspace

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