Subject: Re: "fast" syscalls?
To: Garrett D'Amore <>
From: Brett Lymn <>
List: tech-kern
Date: 03/17/2006 20:28:23
On Thu, Mar 16, 2006 at 08:48:18AM -0800, Garrett D'Amore wrote:
> Specifically, I am going to be sending some operations down to the
> kernel (preferably in a shared region of memory, think FIFO or circular
> Q), and I want to be able to have "signals" between the kernel and
> userland to indicate that there is stuff in the queue (or that the queue
> has been emptied, as an example).

You may want to look at some of the audio drivers which allow you to
mmap a buffer into userland.  From memory they handle the
userland/kernel interaction by updating the head/tail pointers in a
circular queue, userland updates one pointer and the kernel updates
the other... when they pointers are equal the queue is empty.
Unfortunately, it still needs an ioctl to kick the process along but
the bulk data transfer is handled more efficiently.

Brett Lymn