All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] fpu issue
@ 2009-01-20  4:25 Steven Seeger
  2009-01-20  7:20 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 38+ messages in thread
From: Steven Seeger @ 2009-01-20  4:25 UTC (permalink / raw)
  To: xenomai

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

Guys, the FPU issue I've been having with a Geode GX1 and an AMD Geode
LX800 still persists. It seems that we have always had this bug, and
it's timing related. I am pretty sure that the issue revolves around the
fact that xenomai doesn't initialize the FPU in a userspace created
thread until the FPU is actually used. I realize there is a performance
gain to be had here by not having to switch it every time, but to
confirm I would like to make a patch that initializes the FPU when a
thread is created. Can someone please point me in the right direction?

 

Thanks,

Steven

 

PS - Sorry to Gilles for all the bother. J

 


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

^ permalink raw reply	[flat|nested] 38+ messages in thread
* [Xenomai-help] fpu issue
@ 2008-02-09  1:36 Steven Seeger
  2008-02-09 13:29 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 38+ messages in thread
From: Steven Seeger @ 2008-02-09  1:36 UTC (permalink / raw)
  To: xenomai

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

I found the source of my fpu issue. A single kernel module with two
tasks was also active. I noticed the failure occurred whenever sound
would play. (This is one of the tasks.) It seems the problem is that the
sound task doesn't use the FPU, so I didn't turn on T_FPU. The tone task
(not in use at that time) does, so it has T_FPU. When I turned on T_FPU
for the sound task, I never saw the problem again. With it off, if I
played sound while running the program, I'd regularly see the
corruption.

 

Here is the task code:

 

static void sound_func(void *data)

{       

    for (;;) //go until suspended or thread deletion

    { 

        if (play==stop) //time to stop if this happens

        {

            unsigned long evt = 0;

            

            play=stop=0; // just in case

            rt_event_clear(&sound_event, SOUND, 0);

            rt_task_set_periodic(&sound_task, TM_NOW, TM_INFINITE); /*
disable periodic mode */

            rt_event_wait(&sound_event, SOUND, &evt, EV_ALL,
TM_INFINITE);

            rt_task_set_periodic(&sound_task, TM_NOW,
rt_timer_ns2ticks(ST_AUDIO_PERIOD));

        }

        

#if BUFSIZE != 65536

        if (play==BUFSIZE) play=0;

#endif

        

        if(rt_task_wait_period(0)) rt_task_wait_period(0); //wait for
next tick and ignore overruns (do the best we can)

        // Since the index is incrementd subtract 2 from the size before
comparing the index

        

        outb(buf[play++], DAC_ADDRESS); //send the next byte to the dac

    }

}

 

The buffer is filled with a linux userland process and an appropriate
wait queue. This same code worked fine in RTAI without the FPU flag.

 

I've tested this for several minutes.

 

Any idea?

 

Steven

 


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

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

end of thread, other threads:[~2009-01-27 10:35 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20  4:25 [Xenomai-help] fpu issue Steven Seeger
2009-01-20  7:20 ` Gilles Chanteperdrix
2009-01-20 14:34   ` Steven Seeger
2009-01-20 14:49     ` Gilles Chanteperdrix
2009-01-20 14:55       ` Steven Seeger
2009-01-20 14:56         ` Gilles Chanteperdrix
2009-01-21  0:40           ` Steven Seeger
2009-01-21  9:28             ` Gilles Chanteperdrix
2009-01-21 13:30               ` Steven Seeger
2009-01-21 16:42               ` Steven Seeger
2009-01-21 16:48                 ` Gilles Chanteperdrix
2009-01-21 17:07                   ` Steven Seeger
2009-01-21 17:11                     ` Gilles Chanteperdrix
2009-01-21 17:16                       ` Steven Seeger
2009-01-21 17:42                       ` Steven Seeger
2009-01-21 18:01                         ` Gilles Chanteperdrix
2009-01-21 19:41                           ` Steven Seeger
2009-01-21 19:48                             ` Gilles Chanteperdrix
2009-01-21 20:05                               ` Steven Seeger
2009-01-21 20:08                               ` Steven Seeger
2009-01-21 20:45                               ` Steven Seeger
2009-01-21 20:47                               ` Steven Seeger
2009-01-21 21:13                                 ` Gilles Chanteperdrix
2009-01-21 21:20                                   ` Steven Seeger
2009-01-21 21:26                                     ` Gilles Chanteperdrix
2009-01-21 21:27                                       ` Steven Seeger
2009-01-21 21:44                                       ` Steven Seeger
2009-01-21 21:56                                         ` Gilles Chanteperdrix
2009-01-21 21:57                                           ` Steven Seeger
2009-01-26 16:13                                             ` Gilles Chanteperdrix
2009-01-27 10:28                                               ` [Xenomai-help] fpu issue on PPC ? roderik.wildenburg
2009-01-27 10:35                                                 ` Gilles Chanteperdrix
2009-01-21 16:43               ` [Xenomai-help] fpu issue Steven Seeger
  -- strict thread matches above, loose matches on Subject: below --
2008-02-09  1:36 Steven Seeger
2008-02-09 13:29 ` Gilles Chanteperdrix
2008-02-10 15:32   ` Steven Seeger
2008-02-10 15:41     ` Gilles Chanteperdrix
2008-02-10 16:36     ` 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.