lkml.org 
[lkml]   [2001]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question regarding driver developement
> 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/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.018 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site