Reentrant timers/interrupt handlers (HELP!)

Reentrant timers/interrupt handlers (HELP!)

Post by Ekechi K. E. Nwoka » Wed, 12 Aug 1998 04:00:00



Hello all,

I am in the process of writing a parallel file system for linux clusters
and have run into a problem that I don't seem to be able to figure out.

The file system is integrated into VFS just like a regular file system.
However, on each node in the cluster, there is a kernel daemon that
handles requests from other nodes in the cluster to read/write/open
files, etc.

My problem is this, basically I have a timer set up that polls a port
every so often and executes a handler if a request as been issued from a
remote node (This could very easily just be an interrupt handler, but
I'm using custom network hardware and the interrupts don't work.), so
essentially it's an interrupt handler, but not one that preempts the
kernel (obviously).

Anyway, the problem is that in order to read/write any of the buffer
blocks in the VFS buffer cache the interrupt handler needs access to the
buffer cache locks. But the buffers may be locked by some non-interrupt
code. In other words, the interrupt handler may have to wait on a lock
and may need to go to sleep.

So....how do I put the interrupt handler to sleep until the buffer is
unlocked? It's not the same as simply putting a user process to sleep
because this handler is acting independent of any particular user
process on the machine. The interrupt handler itself has to be put to
sleep and woken up again at it's previous point of execution, not just
simply being called again. Sleep() doesn't work since interrupt handlers
are not supposed to go to sleep. I get the standard "Aieeee..........."
message when I do that.

Right now the file system works by ignoring the locks (Arghhh!!!). But
I've got to solve this problem.

Any help would be greatly appreciated,
Thanks,
Ekechi Nwokah

 
 
 

Reentrant timers/interrupt handlers (HELP!)

Post by Arun Sharm » Thu, 13 Aug 1998 04:00:00



Quote:

> So....how do I put the interrupt handler to sleep until the buffer is
> unlocked?

Use spinlocks that don't sleep. If you have to sleep inside the
interrupt handler, something is wrong.

        -Arun

 
 
 

1. How does the timer interrupt handler work ?

Hi! Linuxer.

I want to profile the disk access pattern in LiNUX.(in SCSI HD)
So, I want to know how the timer interrupt handler works.

Is there anyone who can explain the way how the handler works, the
routines and the data structures which are related to the timer ?

Thanks in advance.

--
Operating System Lab. of Dept. of Computer Science & Statistics
Seoul National University
Tel:+82-2-880-6571                                  Kim YoonSoo          

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I believe in Jesus Christ, who is the Son of God and my Savior.

2. Mgetty allows connection and then disconnects immediately...

3. Timer interrupt cleanups [2/3] - local timer

4. RedHat 5.0 Install Bugs

5. Timer interrupt cleanups [1/3] - global timer

6. spinlocks for driver development

7. Ethernet interrupts getting processed as timer interrupts

8. VT100 terminal to COM1

9. Reentrant system calls (can be called from signal handler)

10. signals, signal handlers, glibc reentrant?

11. Calling non-reentrant functions in signal handlers

12. Same lib.so for reentrant and non-reentrant progs

13. Apache Reentrant Call to Interrupt Window