Subject: Re: "fast" syscalls?
To: Brett Lymn <>
From: Garrett D'Amore <>
List: tech-kern
Date: 03/17/2006 10:30:55
Brett Lymn wrote:
> 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.

This is almost exactly what I had in mind.  It is the ioctl that I
wanted to optimize away.

Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134  Fax: 951 325-2191