reentrant timers/interrupt handlers: help!

Ekechi K. E. Nwokah (nwokah@purdue.edu)
Mon, 17 Aug 1998 16:11:42 -0500


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_on() 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html