Re: [RTnet-developers] Debugging
Brought to you by:
bet-frogger,
kiszka
|
From: Jan K. <jan...@si...> - 2010-12-07 17:57:52
|
Am 07.12.2010 18:23, Glen Wernersbach wrote: > Jan, > > I wanted to follow up on the line below. My understand is that you cannot do > hard real time in virtualization. That's not true. Nothing conceptually prevents that hypervisor provide the same determinism like real hardware. You should just not expect to see the same latencies. In practice, not every hypervisor is designed for hard or even just soft RT, just like not every OS provides this. So far, QEMU/KVM is not capable of providing hard guarantees, and it even has problems with soft RT unless you very carefully tune everything. However, last time I tried I was able to measure << 1 ms guest user space latencies in a PREEEMPT-RT or Xenomai on PREEMPT-RT with KVM setup (modern AMD host). And that's an order of magnitude where quite a few real applications start to be happy. > You seem to indicate we can debug our > RTNET app to some extend using QEMU and KVM. > > Just wonder what you experience was? It depends on what aspects of your app, middleware, driver you want to debug and how they react if deadlines are missed. If they jump out of the window because some operation took surprisingly long, then you either need to avoid this code path or relax the check when running in a VM. That's fairly easy with new code, but it can be hairy if not impossible with existing large projects. Transferred to RTnet: I'm able to run a full-featured network (RTmac/TDMA, RTcfg) in multiple VMs with moderate cycles. Of course, deadlines will be missed all the time whenever the host is overloaded or just temporarily busy with other work. But a lot of tests are nevertheless possible. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux |