public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: ajh@atri.curtin.edu.au, linux-kernel@vger.kernel.org
Subject: Re: Question regarding driver developement
Date: Sun, 14 Jan 2001 20:43:02 +0100	[thread overview]
Message-ID: <3A620146.1594EDDB@colorfullife.com> (raw)

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

             reply	other threads:[~2001-01-14 19:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-14 19:43 Manfred Spraul [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-01-12  6:55 Question regarding driver developement Anders Johansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A620146.1594EDDB@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=ajh@atri.curtin.edu.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox