[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: Thu, 2 Aug 2001 09:01:39 +0200 (CEST)
>From owner-rtl Wed Aug 1 11:15:43 2001
Received: from mhultra.aero.org (mhultra.aero.org [130.221.88.102])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f71HFcs08040
for <rtl@fsmlabs.com>; Wed, 1 Aug 2001 11:15:38 -0600
Received: from ladir01.aero.org by mhultra.aero.org with ESMTP for rtl@fsmlabs.com; Wed, 1 Aug 2001 10:11:21 -0700
Subject: Re: [rtl] keyboard freeze with one percent CPU load
To: rtl@fsmlabs.com
X-Mailer: Lotus Notes Release 5.0.7 March 21, 2001
Message-Id: <OFAFC7CBA8.703BE730-ON88256A9B.005D3E36@aero.org>
From: Oliver.J.Enders@aero.org
Date: Wed, 1 Aug 2001 10:11:17 -0700
X-MIMETrack: Serialize by Router on ladir01/AeroNet/Aerospace/US(Release 5.0.5 |September
22, 2000) at 08/01/2001 10:11:21 AM
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Hi,
That's funny. I can receive 1-ms interrupts on an old pentium 166 machine
and use the wakeup_np function inside the interrupt handler. But I only
wake up the thread every 100 interrupts. Depending on the processing load
in the thread, I do find that I can miss interrupts and believe wakeup_np
perhaps has an excessive amount of overhead associated with it. I ended up
using a more efficient signaling mechanism that doesn't have to constantly
wake up the thread. But it worked, and didn't freeze my machine.
The other thing I did differently is keeping everything in one kernel
module. It sounds like you actually load seperate kernel modules. I never
thought about that before.
Oliver Enders
Marvin Germain
<megermain@eart To: rtl@rtlinux.org
hlink.net> cc:
Sent by: Subject: [rtl] keyboard freeze with one percent
owner-rtl@fsmla CPU load
bs.com
07/30/01 04:15
PM
Please respond
to rtl
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 -----