LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-01-2006, 11:41 AM   #1
EmbeddedSteve
LQ Newbie
 
Registered: Sep 2006
Posts: 17

Rep: Reputation: 0
Thread context switch causes lost interrupt


Greetings All,
I'm debugging an embedded system we use for developing software for chips we produce. The system uses a PPC440 PMC card plugged into the system. Communcation is via the PCI bus to a PCI-Bridge device (PLX9056). There is various other HW on the board to support our testing needs.
We ran into a problem recently, and through debugging with a Logic Analyzer, we found what we believe to be the root cause.
We are receiving an interrupt from our device (chip) at a point where the Linux Kernel is doing a "context switch" from the ISR thread back to the main thread (we are using POSIX Thread library on a 2.4.21 kernel). From the trace, we see that the kernel part of the IRQ handler seems to run, as it does the specified reads/writes to acknowledge the interrupt. However, the User level processing does not receive this indication.
The driver was written some time ago (not by me) and uses a tasklet to then provide the User indication. The User level is "hanging" on a queue in an IOCTL call. So somewhere in the kernel, it seems that the tasklet is not being run, due to the fact that the kernel is in the middle of this thread context switch.
Has anyone run into this before? Is this a known bug in the kernel? Any insights/pointers would be greatly appreciated.

TIA,
Steve
 
Old 09-01-2006, 03:45 PM   #2
SteveK1979
Member
 
Registered: Feb 2004
Location: UK
Distribution: RHEL, Ubuntu, Solaris 11, NetBSD, OpenBSD
Posts: 225

Rep: Reputation: 43
Hi Steve,

Welcome to LQ! Hope you find it useful here.

I'm afraid I can't help you specifically with this issue, but I'd be tempted to have a search through the archives or possibly post to an appropriate mailing list over at kernel.org. Check out http://vger.kernel.org/ for more info on the linux kernel development mailing lists.

Cheers,
Steve
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Context switch arunachalam Linux - General 3 06-15-2009 01:21 PM
Handling of Interrupts in thread context asurya Linux - Newbie 1 04-05-2006 09:15 AM
thread switch results in kernel stack switch superstition Linux - General 1 05-17-2005 11:48 PM
Kernel Thread Execution Context and PID ratwings Linux - Newbie 0 02-11-2005 04:06 AM
** WLAN busy-sleeping in interrupt context! adelaideyip Linux - Wireless Networking 0 08-20-2004 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration