[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Wed, 1 Aug 2001 10:12:55 +0200 (CEST)
>From owner-rtl Tue Jul 31 17:31:14 2001
Received: from stl-smtpout-01.boeing.com (stl-smtpout-01.boeing.com [12.13.247.21])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f6VNV4702565
for <rtl@fsmlabs.com>; Tue, 31 Jul 2001 17:31:14 -0600
Received: from slb-av-01.boeing.com ([129.172.13.4])
by stl-smtpout-01.boeing.com (8.9.2/8.8.5-M2) with ESMTP id SAA04131
for <rtl@fsmlabs.com>; Tue, 31 Jul 2001 18:30:51 -0500 (CDT)
Received: from slb-hub-01.boeing.com (localhost [127.0.0.1])
by slb-av-01.boeing.com (8.9.3/8.9.2/MBS-AV-01) with ESMTP id QAA16434
for <rtl@fsmlabs.com>; Tue, 31 Jul 2001 16:30:32 -0700 (PDT)
Received: from xch-pssbh-01.nw.nos.boeing.com by slb-hub-01.boeing.com with ESMTP for rtl@fsmlabs.com; Tue, 31 Jul 2001 16:26:24 -0700
Received: by xch-pssbh-01.nw.nos.boeing.com with Internet Mail Service (5.5.2650.21)
id <P0FA4H6G>; Tue, 31 Jul 2001 16:26:23 -0700
Message-Id: <949ACC17102DD045AAB154CEB75A7EC402B10D5F@xch-nw-21.nw.nos.boeing.com>
From: "Basham, Richard R" <Richard.Basham@PSS.Boeing.com>
To: "'rtl@fsmlabs.com'" <rtl@fsmlabs.com>
Subject: RE: [rtl] keyboard freeze with one percent CPU load
Date: Tue, 31 Jul 2001 16:26:14 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain
Marvin,
The ISR may only take 50 ms to execute but how long does the computational thread take. The computational thread running in an rt-kernel module will have higher priority than linux and linux user space. Therefore, if your computational thread combined with the ISR consume enough time linux will not get a chance to run. If the processing that you are doing in the computational thread is not time critical then you could have it run in user space.
If in fact the 50 ms includes the computational thread execution as well then I would suggest to you that maybe you are running past the end of an array and clobbering memory that linux is using thus freezing the operating system. However, this does not fit your point that slowing down the interrupts prevents the freezing of the operating system.
I believe user space cpu monitors do not recognize that rt-linux exists. Therefore, they only report the cpu usage of linux and its processes. The cpu usage of the rt-linux processes will not be visible.
I hope this helps,
Rich
-----Original Message-----
From: Marvin Germain [mailto:megermain@earthlink.net]
Sent: Monday, July 30, 2001 6:16 PM
To: rtl@rtlinux.org
Subject: [rtl] keyboard freeze with one percent CPU load
Hello, all.
My mouse and keyboard freeze when I call pthread_wakeup_np() from within
a hard interrupt service routine. I am using RTLinux 3.0 with kernel
2.2.18 on a 1.5 GHz P4. My project uses two RTLinux modules: The first
services hardware interrupts and transfers data from a DAQ board into an
mbuff. The first module then wakes up a thread containied in a second
module which performs computations on the data. Here is the basic
format:
**************
First module: *
**************
extern pthread_t myThread;
unsigned int my_isr(unsigned int irq, struct pt_regs *regs) {
/* perform hardware-related things here */
rtl_hard_enable_irq(irq);
pthread_wakeup_np(myThread);
}
***************
Second module: *
***************
pthread_t myThread;
void *myEntryPoint(void *p) {
while(1) {
pthread_suspend_np(myThread);
/* perform calculations here */
}
}
When the interrupt rate is once every five milli-seconds, the mouse and
keyboard freeze within two to three seconds. If I slow down the
hardware so that the interrupts come only once every six milli-seconds,
everything seems fine. I timed the execution of the ISR at 50
micro-seconds. So the CPU loading is only one percent. The freezes
occur even if I comment out everything in the while-loop except for the
pthread_suspend_np(). The freezes do NOT occur if I comment out the
pthread_wakeup_np() from the ISR. Any ideas?
Marvin
-
*********************************************
* Dr. Marvin E. Germain *
* Zygo Corporation - Tucson AZ *
* megermain@earthlink.net *
*********************************************
----- End of forwarded message from owner-rtl@fsmlabs.com -----
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/
----- End of forwarded message from owner-rtl@fsmlabs.com -----