From: Jan Kiszka <jan.kiszka@domain.hid>
To: Johan Visser <johan.visser@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Running Xenomai in a virtual machine
Date: Fri, 12 Jun 2009 15:00:57 +0200 [thread overview]
Message-ID: <4A325189.5060905@domain.hid> (raw)
In-Reply-To: <4A324D3D.9060505@domain.hid>
Johan Visser wrote:
> Jan Kiszka schreef:
>> Sebastian Smolorz wrote:
>>
>>> Peter Soetens wrote:
>>>
>>>> I'm looking for a more agile way to run my unit tests (and build farm)
>>>> on a Xenomai system, without running them directly my development
>>>> system (nor rebooting to a Xenomai patched kernel). I was hoping that
>>>> a virtualisation solution would do the trick. Does anyone have
>>>> experience with running a Xenomai patched kernel + applicaiton in
>>>> vmware or another virtualisation package ?
>>>>
>>>>
>>> Xenomai runs perfectly inside qemu, without real-time guarantees, of
>>> course.
>>>
>>>
>>
>> Most of the time we are developing on and for Xenomai inside qemu-kvm,
>> often using '-smp 2' (or more) and an SMP host so that the more
>> interesting races are triggered. In contrast to other hypervisors, this
>> offers the chance to do source-level kernel debugging, also when the
>> target hopelessly locked up deep inside I-pipe - situations that are
>> almost undebugable on real x86 hardware.
>>
>> For sure, you don't get reasonable latencies this way (though evaluating
>> kvm under -rt /wrt soft-rt is on my to-do list for the next weeks), but
>> a lot of testing does not require this anyway. Moreover, qemu/kvm
>> cleanly integrates with Linux, thus can easily be scripted. If you plan
>> to set up some test farm, you may also want to have a look at
>> kvm-autotest (currently under merge into autotest).
>>
>> Jan
>>
>>
> Just the last few days we were trying to do the same with our XENOMAI
> system and application.
>
> According the package info I can not use KVM because the processor of my
> laptop does not have hardware virtualisation support.
If /proc/cpuinfo lacks vmx (intel) or svm (amd) *and* there is no magic
switch in your notebook's bios to enable virtualization, then you are
out of luck /wrt accelerated qemu(-kvm) use. You could still use qemu in
emulation mode, but that is 10..40 times slower than native (but still
better than nothing if you have to debug the guest kernel - I've done
this before kvm arrived).
> Virtualbox failed on a standard PC , it took 5 minutes to boot my guest
> and then after that froze.
> VMware runs, but gives heavy CPU load ( about 38 % ) instead of 6-8 % on
> a real system.
That's expected if your CPU actually lacks hardware virtualization.
> The application runs, but of course it is not realtime.
>
> The system i am using on my laptop is a standard Ubuntu system.
>
> I was wondering if the kernel running on my host system is of importance
> too.
> Now it schedules at 250 HZ. I tried to use a -rt kernel fom the ubuntu
> repository ( 1000 Hz ) but this will not work on my system some how.
All modern distros have high-resolution timers enabled, so the kernel's
scheduler tick doesn't really matter anymore (unless the hypervisor
screws it up...). I can watch best-case 'latency' results under kvm that
are in the order of some ten microseconds. But the worst case is more
about some ten ms on a normal distro kernel (CONFIG_PREEMPT_VOLUNTARY
here, still need to try PREEMPT_RT). But even with -RT, there will
remain critical code paths in the hypervisor that go through RT-unsuited
host kernel subsystems, so you will get a better average, but no guarantees.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2009-06-12 13:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-12 9:40 [Xenomai-help] Running Xenomai in a virtual machine Peter Soetens
2009-06-12 9:48 ` Sebastian Smolorz
2009-06-12 11:02 ` Jan Kiszka
2009-06-12 11:14 ` Peter Soetens
2009-06-12 12:42 ` Johan Visser
2009-06-12 13:00 ` Jan Kiszka [this message]
2009-06-12 13:10 ` Jan Kiszka
2009-06-12 14:33 ` Johan Visser
2009-06-22 13:15 ` ROSSIER Daniel
2009-06-22 13:55 ` Jan Kiszka
2009-06-22 14:05 ` ROSSIER Daniel
2009-06-22 14:26 ` Gilles Chanteperdrix
2009-06-22 15:05 ` ROSSIER Daniel
2009-06-22 15:17 ` Gilles Chanteperdrix
2009-06-22 15:45 ` ROSSIER Daniel
2009-06-12 13:16 ` Gilles Chanteperdrix
2009-06-12 13:25 ` Jan Kiszka
2009-06-22 20:46 ` Johan Visser
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=4A325189.5060905@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=johan.visser@domain.hid \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.