All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai] Problems with running Xenomai on Core i5
@ 2013-08-09 12:48 Tobias Luksch
  2013-08-09 18:27 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: Tobias Luksch @ 2013-08-09 12:48 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org

Hello Gilles,

thank you for your help. I disabled ACPI in the kernel as another desperate try while hunting down my problem, now I will enable it again. 

I mainly opted for kernel version 3.2.21 as we need a 3.2 kernel because of some other software we have to use in the project and the adeos patch for 3.2.21 came with the xenomai 2.6.2.1 tarball. Could you suggest another 3.2 kernel version, or would you discourage me from using a 3.2.x kernel at all?

Regards,
Tobias

-----Ursprüngliche Nachricht-----
Von: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org] 
Gesendet: Mittwoch, 7. August 2013 20:01
An: Tobias Luksch
Cc: xenomai@xenomai.org
Betreff: Re: [Xenomai] Problems with running Xenomai on Core i5

On 08/07/2013 03:38 PM, Tobias Luksch wrote:
> Hello,
> 
> (Some key data to begin with: kernel v3.2.21, xenomai v2.6.2.1, 
> ipipe-core-3.2.21-x86-5.patch as within the 2.6.2.1 xenomai release, 
> all on Ubuntu 12.04 with gcc 4.6.3)
> 
> 
> currently I am trying to use Xenomai on an embedded PC with an Intel 
> Core i5 CPU (M520 @ 2.40GHz). While debugging processing times of our 
> application, I encountered strange non-determinism, i.e. parts of the 
> program doing only computations (w/o any mutexes etc.) sometimes took 
> more than twice the time to compute than usual.
> 
> So I wrote a simple test program (attached) based on 
> examples/native/trivial-periodic creating a 1000Hz loop. In each 
> cycle, a few
> 1000 sine functions are computed, with measuring the time it takes to 
> do so. I would expect a rather constant computation time, but I see 
> significant jitter (average duration ~0.09ms, jitter up to +-40%).
> 
> What's more, when I generate heavy CPU load on the linux side, the 
> computation time for the sine functions drops to about 0.06ms and 
> shows no more significant jitter at all. As soon as I stop producing 
> CPU load, computation time and jitter go up again.
> 
> Running the same test program on a laptop with an Intel Core2 Duo and 
> same kernel version, kernel settings, and xenomai version runs as 
> expected: constant computation time, very low jitter, no influence by 
> adding load on the linux side.
> 
> To me it looks like some power management feature of the CPU is 
> kicking in. I have disabled (hopefully) all relevant features in the 
> BIOS (like EISS, TurboBoost, Idle Modes, ...) and in the kernel (CPU 
> frequency scaling, ..., config file of me latest try is attached), 
> /proc/cpuinfo always shows the same frequency. Still I get the behavior described above.

The config file lacks CONFIG_ACPI, you should enable ACPI, only CONFIG_ACPI_PROCESSOR should be disabled.

Other than that, you should not use 3.2.21, this version is known to have issues with xenomai. Also, since you are using a Debian based system, you may try to add:
deb http://www.xenomai.org/debian squeeze main

to /etc/apt/sources.list, then do

apt-get update
apt-get install xenomai-keyring
apt-get update
apt-get install linux-image-3.5.7-xenomai-2.6.2.1

-- 
                                                                Gilles.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Xenomai] Problems with running Xenomai on Core i5
@ 2013-08-07 13:38 Tobias Luksch
  2013-08-07 15:13 ` Matthew Fornero
  2013-08-07 18:01 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 7+ messages in thread
From: Tobias Luksch @ 2013-08-07 13:38 UTC (permalink / raw)
  To: xenomai@xenomai.org

Hello,

(Some key data to begin with: kernel v3.2.21, xenomai v2.6.2.1, 
ipipe-core-3.2.21-x86-5.patch as within the 2.6.2.1 xenomai release, all on 
Ubuntu 12.04 with gcc 4.6.3)


currently I am trying to use Xenomai on an embedded PC with an Intel Core i5 
CPU (M520 @ 2.40GHz). While debugging processing times of our application, I 
encountered strange non-determinism, i.e. parts of the program doing only 
computations (w/o any mutexes etc.) sometimes took more than twice the time to 
compute than usual.

So I wrote a simple test program (attached) based on 
examples/native/trivial-periodic creating a 1000Hz loop. In each cycle, a few 
1000 sine functions are computed, with measuring the time it takes to do so. I 
would expect a rather constant computation time, but I see significant jitter 
(average duration ~0.09ms, jitter up to +-40%). 

What's more, when I generate heavy CPU load on the linux side, the computation 
time for the sine functions drops to about 0.06ms and shows no more significant 
jitter at all. As soon as I stop producing CPU load, computation time and 
jitter go up again.

Running the same test program on a laptop with an Intel Core2 Duo and same 
kernel version, kernel settings, and xenomai version runs as expected: constant 
computation time, very low jitter, no influence by adding load on the linux 
side.

To me it looks like some power management feature of the CPU is kicking in. I 
have disabled (hopefully) all relevant features in the BIOS (like EISS, 
TurboBoost, Idle Modes, ...) and in the kernel (CPU frequency scaling, ..., 
config file of me latest try is attached), /proc/cpuinfo always shows the same 
frequency. Still I get the behavior described above.

Any help and feedback would be appreciated.

Thanks,
Tobias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: config-3.2.21-xenomai-2.6.2.1
Type: application/octet-stream
Size: 143553 bytes
Desc: config-3.2.21-xenomai-2.6.2.1
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130807/f2a77ea9/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: trivial-periodic.c
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130807/f2a77ea9/attachment.c>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-09 18:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-09 12:48 [Xenomai] Problems with running Xenomai on Core i5 Tobias Luksch
2013-08-09 18:27 ` Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2013-08-07 13:38 Tobias Luksch
2013-08-07 15:13 ` Matthew Fornero
2013-08-07 18:05   ` Gilles Chanteperdrix
     [not found]   ` <1124806E0C09F04A992E69AE2EC7FA3C80A996@swexchange01.itk.local>
2013-08-09 12:46     ` Matthew Fornero
2013-08-07 18:01 ` Gilles Chanteperdrix

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.