Re: [RFC] Semaphores used for daemon wakeup

From: Brian Pomerantz (bapper@llnl.gov)
Date: Fri Dec 22 2000 - 12:32:43 EST


On Thu, Dec 21, 2000 at 01:30:03PM -0600, Paul Cassella wrote:
> The mechanism being developed here seems a lot like synchronization
> variables (aka condition variables), which are a part of the "monitor"
> synchronization construct. There is a simple implementation of them in
> the xfs patch. I've been working on a more general version in order to
> aid porting some other stuff, which I have appended to this post.
>
> I had been holding off on posting about it since I didn't have any code
> that used it ready, and probably wouldn't until 2.5 anyway, but due to
> this thread, I think bringing it up now might be helpful.
>

We have a similar set of locks that were developed while porting the
Quadrics device drivers over to Linux from True64. These are pretty
close to the way pthreads mutexes and condition variables work in user
space and are similar to primitives that exist in True64 kernel land
(thus the need to develop them to make the port easier). They allow
for use of semaphores or spinlocks depending on whether you are going
to sleep while holding the mutex. The only caveat with it is that it
requires that wake_up_process() be exported in kernel/ksyms.c in order
to use it in modules. We're in the process of making a Linux web site
here at the lab that has papers as well as patches that we have made
to help Linux along in the high performance computing area. Until
that is up, here are the two files that implement mutexes and
condition variables.

BAPper





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



This archive was generated by hypermail 2b29 : Sat Dec 23 2000 - 21:00:32 EST