* Re: Question regarding driver developement
@ 2001-01-14 19:43 Manfred Spraul
0 siblings, 0 replies; 2+ messages in thread
From: Manfred Spraul @ 2001-01-14 19:43 UTC (permalink / raw)
To: ajh, linux-kernel
> 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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Question regarding driver developement
@ 2001-01-12 6:55 Anders Johansson
0 siblings, 0 replies; 2+ messages in thread
From: Anders Johansson @ 2001-01-12 6:55 UTC (permalink / raw)
To: linux-kernel
Hi
I am very sorry for disturbing the kernel development with this question
which I suspect might be off topic. If I am totally off topic please tell
me where to find help in your flame mails.
I am developing a device driver (will be GPL) for a PCI board hosting two
Digital Signal Processors (DSPs). The software running on the DSPs needs
disk access (~10Mb/s). The board has DMA engines built in to it's PCI
bridges which are capable of bus mastering. The Software running on the
DSPs requires soft realtime response from the disk access.
What I want to do is to stream data directly to a file on the hard drive if
possible.
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.
This is quite inefficient however since it requires at least 5 memcopy
operations before the data reaches the hard drive.
I could dedicate one complete SCSI bus for the disk I/O.
Is it possible to write to a file from within a device driver?
If it is it would save 3 memcopy operations (if I am correct :).
Is it advisable?
I am not subscribed to this list so please reply to me personally.
Thank you very much for your help.
Best Regards,
//Anders
______________________________________________________________________
Anders Johansson Room 314,113 Australian Telecommunications .-_|\
Visiting Research Associate Research Institute (ATRI) / \
telephone: +61 8 9266 3268 Curtin Uni of Technology P_.-._/
e-mail: ajh@atri.curtin.edu.au Bentley WA, 6102. o
______________________________________________________________________
-
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-14 19:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-14 19:43 Question regarding driver developement Manfred Spraul
-- strict thread matches above, loose matches on Subject: below --
2001-01-12 6:55 Anders Johansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox