Re: [rtl] rtl_time module stops working

2002-01-31 Thread Kristoffer Persson

On Wed, 30 Jan 2002 [EMAIL PROTECTED] wrote:

 When you build Linux/RTLinux are you configuring for an AMD, enabling
 any MTRR ?

My kernel and RTLinux modules were built for i486, because that's what an
AMD 5x86 essentially is. CONFIG_MTRR is not set. I also tried to rebuild
the whole kernel and all RTLinux modules for 5x86, which I believe refers
to other CPUs called 5x86 that are more Pentium-like. This time I built
everything with gcc-2.95.3. The problem is still there, though.

 Is this a patched kernel from RTLinux.org?
 Does it have any other patches in it?

It is a standard 2.4.4 kernel from kernel.org with only the RTLinux 3.1
patch on it.

RTLinux 3.1, Linux 2.4.4, CPU AMD 5x86, gcc 2.96 (from RedHat 7.2).
 
  I have now tried using nanosleep() and clock_nanosleep() but the result is
  the same. But when I set the timer in periodic mode my thread ran for over
  twelve hours before I interrupted it so it seems as if rtl_time sometimes
  fails to re-program the timer chip.
 
  Some more observations:
 
  When my task is frozen, everything else timer related is frozen too.
  'date' returns the time when the task froze, 'sleep 1' blocks forever.
 
  If I leave the stopped task in memory and don't touch the system it will
  start again after some time, typically it seems to take about 30 min.

Another observation: When the task freezes and is left alone, it wakes up
automatically after 30min +/- one or two seconds. Since 30 min = 2^31
ticks of the 8253 timer, this tells me that the timer accidentally gets
programmed with the msb set or something similar. Is that at all possible?

Thanks again.

Kris


-- [rtl] ---
To unsubscribe:
echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/




Re: [rtl] rtl_time module stops working

2002-01-30 Thread yodaiken

When you build Linux/RTLinux are you configuring for an AMD, enabling
any MTRR ?

Is this a patched kernel from RTLinux.org?
Does it have any other patches in it?


On Thu, Jan 31, 2002 at 03:22:13AM +0100, Kristoffer Persson wrote:
 On Tue, 29 Jan 2002, Calin A. Culianu wrote:
 
  On Tue, 29 Jan 2002, Kristoffer Persson wrote:
 
   After some time (a few minutes to a few hours) of operation, the RT task I
   am running stops without any message. If I rmmod and insmod it again, it
   will run for about a seconds before it stops again. If I re-insert
   rtl_sched and rtl_time and my module, it will run again for some time
   (~min-hours) before stopping.
  
   RTLinux 3.1, Linux 2.4.4, CPU AMD 5x86, gcc 2.96 (from RedHat 7.2).
  
 
  Hmmm.  This should work. Although my understanding was that somehow using
  nanosleep() was supposed to be preferable to pthread_make_periodic_np.  Oh
  well.  :)
 
 Thanks for taking your time, but the problem is still there.
 
 I have now tried using nanosleep() and clock_nanosleep() but the result is
 the same. But when I set the timer in periodic mode my thread ran for over
 twelve hours before I interrupted it so it seems as if rtl_time sometimes
 fails to re-program the timer chip.
 
 Some more observations:
 
 When my task is frozen, everything else timer related is frozen too.
 'date' returns the time when the task froze, 'sleep 1' blocks forever.
 
 If I leave the stopped task in memory and don't touch the system it will
 start again after some time, typically it seems to take about 30 min.
 
 The same task seems to run OK under the same kernel version, same RTLinux
 version and same compiler but on a P4 1.6GHz.
 
 Any more suggestions anyone? Thanks in advance.
 
 /Kris
 
 -- [rtl] ---
 To unsubscribe:
 echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
 echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
 --
 For more information on Real-Time Linux see:
 http://www.rtlinux.org/

-- 
-
Victor Yodaiken 
Finite State Machine Labs: The RTLinux Company.
 www.fsmlabs.com  www.rtlinux.com

-- [rtl] ---
To unsubscribe:
echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/




Re: [rtl] rtl_time module stops working

2002-01-29 Thread Madan Mohan Jampani

Hi,
  I too have some problems with the working of rtl_sched.o.

My realtime task is a simple application that reads data from the serial port. It 
is a interrupt driven task which is invoked when data arrives at the serial port.
My program runs fine for some time ( a few minutes) and hangs. If I reinsert  
rtl_sched and my rt module  it runs fine for a few more minutes and again hangs.

Any suggestions would be helpful.

Thanks
Madan.






On Mon, 28 Jan 2002 21:46:42  
 Norm Dresner wrote:
I can't help you solve your problem because I've never seen anything like
that happen that wasn't my fault.

What I can tell you is that for my periodic threads, I use
pthread_create()
followed by
pthread_make_periodic_np()
and in the while-loop, I suspend with
rt_task_wait().

I've left this system running for over a week at 1200 Hz and logged over a
billion (10^9) invocations with no apparent glitches.

Norm

- Original Message -
From: Kristoffer Persson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 7:57 PM
Subject: [rtl] rtl_time module stops working


 Hi,

 Has anyone observed and solved the following?

 After some time (a few minutes to a few hours) of operation, the RT task
I
 am running stops without any message. If I rmmod and insmod it again, it
 will run for about a seconds before it stops again. If I re-insert
 rtl_sched and rtl_time and my module, it will run again for some time
 (~min-hours) before stopping.

 My task is really simple, it only flips a bit on the parallel port. I
have
 tried task periods between 50us and 1ms and it appears to run longer the
 longer the period.

 void *rtfunc( void *param )
 {
 unsigned char value = 0;
 unsigned char mask = 0x01;

 pthread_make_periodic_np( thread, gethrtime() + PERIOD, PERIOD);

 while ( 1 ) {
 pthread_wait_np();
 rtl_outb( value, PORT );
 value ^= mask; // Toggle bit
 }

 return 0;

 } /* rtfunc */

 RTLinux 3.1, Linux 2.4.4, CPU AMD 5x86, gcc 2.96 (from RedHat 7.2).

 I found an earlier post about a similar problem with an older version of
 RTLinux and the reply was that it had been fixed in the 3.0 release.

 Hope someone can help, this is getting a bit annoying.

 Kris


 -- [rtl] ---
 To unsubscribe:
 echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
 echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
 --
 For more information on Real-Time Linux see:
 http://www.rtlinux.org/



-- [rtl] ---
To unsubscribe:
echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/




Is your boss reading your email? Probably
Keep your messages private by using Lycos Mail.
Sign up today at http://mail.lycos.com
-- [rtl] ---
To unsubscribe:
echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/




Re: [rtl] rtl_time module stops working

2002-01-29 Thread Calin A. Culianu


Hmmm.  This should work. Although my understanding was that somehow using
nanosleep() was supposed to be preferable to pthread_make_periodic_np.  Oh
well.  :)

-Calin

On Tue, 29 Jan 2002, Kristoffer Persson wrote:

 Hi,

 Has anyone observed and solved the following?

 After some time (a few minutes to a few hours) of operation, the RT task I
 am running stops without any message. If I rmmod and insmod it again, it
 will run for about a seconds before it stops again. If I re-insert
 rtl_sched and rtl_time and my module, it will run again for some time
 (~min-hours) before stopping.

 My task is really simple, it only flips a bit on the parallel port. I have
 tried task periods between 50us and 1ms and it appears to run longer the
 longer the period.

 void *rtfunc( void *param )
 {
 unsigned char value = 0;
 unsigned char mask = 0x01;

 pthread_make_periodic_np( thread, gethrtime() + PERIOD, PERIOD);

 while ( 1 ) {
   pthread_wait_np();
   rtl_outb( value, PORT );
   value ^= mask;  // Toggle bit
 }

 return 0;

 } /* rtfunc */

 RTLinux 3.1, Linux 2.4.4, CPU AMD 5x86, gcc 2.96 (from RedHat 7.2).

 I found an earlier post about a similar problem with an older version of
 RTLinux and the reply was that it had been fixed in the 3.0 release.

 Hope someone can help, this is getting a bit annoying.

 Kris


 -- [rtl] ---
 To unsubscribe:
 echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
 echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
 --
 For more information on Real-Time Linux see:
 http://www.rtlinux.org/


-- [rtl] ---
To unsubscribe:
echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/




[rtl] rtl_time module stops working

2002-01-28 Thread Kristoffer Persson

Hi,

Has anyone observed and solved the following?

After some time (a few minutes to a few hours) of operation, the RT task I
am running stops without any message. If I rmmod and insmod it again, it
will run for about a seconds before it stops again. If I re-insert
rtl_sched and rtl_time and my module, it will run again for some time
(~min-hours) before stopping.

My task is really simple, it only flips a bit on the parallel port. I have
tried task periods between 50us and 1ms and it appears to run longer the
longer the period.

void *rtfunc( void *param )
{
unsigned char value = 0;
unsigned char mask = 0x01;

pthread_make_periodic_np( thread, gethrtime() + PERIOD, PERIOD);

while ( 1 ) {
pthread_wait_np();
rtl_outb( value, PORT );
value ^= mask;  // Toggle bit
}

return 0;

} /* rtfunc */

RTLinux 3.1, Linux 2.4.4, CPU AMD 5x86, gcc 2.96 (from RedHat 7.2).

I found an earlier post about a similar problem with an older version of
RTLinux and the reply was that it had been fixed in the 3.0 release.

Hope someone can help, this is getting a bit annoying.

Kris


-- [rtl] ---
To unsubscribe:
echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/




Re: [rtl] rtl_time module stops working

2002-01-28 Thread Norm Dresner

I can't help you solve your problem because I've never seen anything like
that happen that wasn't my fault.

What I can tell you is that for my periodic threads, I use
pthread_create()
followed by
pthread_make_periodic_np()
and in the while-loop, I suspend with
rt_task_wait().

I've left this system running for over a week at 1200 Hz and logged over a
billion (10^9) invocations with no apparent glitches.

Norm

- Original Message -
From: Kristoffer Persson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 7:57 PM
Subject: [rtl] rtl_time module stops working


 Hi,

 Has anyone observed and solved the following?

 After some time (a few minutes to a few hours) of operation, the RT task
I
 am running stops without any message. If I rmmod and insmod it again, it
 will run for about a seconds before it stops again. If I re-insert
 rtl_sched and rtl_time and my module, it will run again for some time
 (~min-hours) before stopping.

 My task is really simple, it only flips a bit on the parallel port. I
have
 tried task periods between 50us and 1ms and it appears to run longer the
 longer the period.

 void *rtfunc( void *param )
 {
 unsigned char value = 0;
 unsigned char mask = 0x01;

 pthread_make_periodic_np( thread, gethrtime() + PERIOD, PERIOD);

 while ( 1 ) {
 pthread_wait_np();
 rtl_outb( value, PORT );
 value ^= mask; // Toggle bit
 }

 return 0;

 } /* rtfunc */

 RTLinux 3.1, Linux 2.4.4, CPU AMD 5x86, gcc 2.96 (from RedHat 7.2).

 I found an earlier post about a similar problem with an older version of
 RTLinux and the reply was that it had been fixed in the 3.0 release.

 Hope someone can help, this is getting a bit annoying.

 Kris


 -- [rtl] ---
 To unsubscribe:
 echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
 echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
 --
 For more information on Real-Time Linux see:
 http://www.rtlinux.org/



-- [rtl] ---
To unsubscribe:
echo unsubscribe rtl | mail [EMAIL PROTECTED] OR
echo unsubscribe rtl Your_email | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/