All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] fpu
@ 2008-02-07 15:23 Steven Seeger
  2008-02-07 15:44 ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Seeger @ 2008-02-07 15:23 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

This is probably an application error, but I am having some random weird
behavior where sometimes a double that I add 0.01 to in a periodic task
gets corrupted and becomes nan. I didn't specify the T_FPU flag in
rt_task_spawn() but the docs said that flag is assumed for a user space
task. I've since set that flag manually and haven't had the problem
happen yet. Is this just a coincidence? 

 

The corruption seems to happen in a half-second window where the system
is doing a lot and only about 35% of the CPU is available to Linux.
However, I am testing for overruns on rt_task_wait_period() and never
seeing any.

 

Steven

 


[-- Attachment #2: Type: text/html, Size: 2562 bytes --]

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

* Re: [Xenomai-help] fpu
  2008-02-07 15:23 Steven Seeger
@ 2008-02-07 15:44 ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2008-02-07 15:44 UTC (permalink / raw)
  To: Steven Seeger; +Cc: xenomai

Steven Seeger wrote:
> This is probably an application error, but I am having some random weird
> behavior where sometimes a double that I add 0.01 to in a periodic task
> gets corrupted and becomes nan. I didn't specify the T_FPU flag in
> rt_task_spawn() but the docs said that flag is assumed for a user space
> task. I've since set that flag manually and haven't had the problem
> happen yet. Is this just a coincidence? 
> 

Likely, as T_FPU is hard-coded for user space threads. You could try to
strip down your test so that incorrect application behaviour can be
excluded (or use the test below).

>  
> 
> The corruption seems to happen in a half-second window where the system
> is doing a lot and only about 35% of the CPU is available to Linux.
> However, I am testing for overruns on rt_task_wait_period() and never
> seeing any.

Overload must not cause data corruption, "only" missed deadlines. This
case needs closer examination.

As some first step: there is the switchtest tool coming with Xenomai. It
includes consistency checks of the FPU environment across context
switches. Maybe you can give this a try under similar load conditions
over a longer period.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


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

* [Xenomai-help] fpu
@ 2008-02-08 17:59 Steven Seeger
  2008-02-08 18:32 ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Seeger @ 2008-02-08 17:59 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

We ran switchtest and it seems to pass. It continues to perform context
switches (about 4600/sec) and doesn't report any errors. So, I'll take
that to mean that I have an application problem somewhere.

 

Thanks for the advice.

 

Steven

 


[-- Attachment #2: Type: text/html, Size: 2160 bytes --]

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

* Re: [Xenomai-help] fpu
  2008-02-08 17:59 [Xenomai-help] fpu Steven Seeger
@ 2008-02-08 18:32 ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2008-02-08 18:32 UTC (permalink / raw)
  To: Steven Seeger; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

Steven Seeger wrote:
> We ran switchtest and it seems to pass. It continues to perform context
> switches (about 4600/sec) and doesn't report any errors. So, I'll take
> that to mean that I have an application problem somewhere.
> 

Well, let's say it is less likely. If you can manage to shrink down your 
scenario now, this may either point to the application bug - or generate 
a nice test case we could try out.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

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

end of thread, other threads:[~2008-02-08 18:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 17:59 [Xenomai-help] fpu Steven Seeger
2008-02-08 18:32 ` Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2008-02-07 15:23 Steven Seeger
2008-02-07 15:44 ` Jan Kiszka

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.