Re: Question regarding driver developement

Manfred Spraul (manfred@colorfullife.com)
Sun, 14 Jan 2001 20:43:02 +0100


> The only way I have found so far is to write have two FIFO buffers in the
> driver (in and out) and use a daemon running in user space to manage the
> disk access.

Have you thought about using mmap and raw-io?

* the kernel driver allocates a fifo (probably a ring?) buffer. The
driver implement mmap.
* the user space daemon mmaps the complete ring buffer.
* The user space daemon waits until the next block is written to the
ring, then it uses /dev/raw?? to write the data to the disk.

> This is quite inefficient however since it requires at least 5 memcopy
> operations before the data reaches the hard drive.

0-memcopy, direct DSP DMA->main memory; main memory->SCSI DMA :-)

mmap is always possible, raw-io needs one dedicated partition and I'm
not sure if it's supported in stock 2.2.18 (but there are add-on patches
for 2.2)

> The Software running on the DSPs requires soft realtime
> response from the disk access.

You could also replace the user space daemon with a kernel_thread(), but
I doubt that this will be necessary.

--
	Manfred
-
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/