linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jelle Foks <jelle@flying.demon.nl>
To: linux-mm@kvack.org
Subject: I/O and MM question
Date: Sun, 10 Jan 1999 18:13:38 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.03.9901101752050.13236-100000@zap.zap> (raw)

Hi,

I have a question about memory management in Linux and low-overhead I/O
between devices and the file system.

I have a device that has memory-mapped access. In a system with 8MB of RAM
(where the kernel reports and uses only 8MB of RAM), the device responds
to memory read and write accesses in the region 8-16MB. What I need to do
is fast I/O between the device the hard drive. Currently, I access the
device from a module that has mapped the device's I/O RAM addresses to a
pointer with vremap(). This way, I should be able to make a character
device that allows a user space process to fread() from the device and
fwrite() to the hard drive (and vice versa). However, I'd like to
eliminate the memory copy to/from the user-space process's buffer, and do
something like an fwrite() directly from the simulated-RAM provided by the
device (or probably better a memcpy() from the device to a mmap()ped file
from disk).

Can I give a user process read/write access to the RAM from the device?
(how/which function to use?). Does the mm/paging system of Linux allow me
this? Or does the mm/paging code already somehow eliminate the memory-copy
of the fread()->fwrite() combo (how?)? Or should/could I use a scheme
where the user space process gives the pointer of a mmap()ed file to the
device driver, and let the device driver itself do a memcpy() to the
mmap()ped file?

Does anybody have any hints, ideas, etc?

Greetings,
Jelle.


--
This is a majordomo managed list.  To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org

             reply	other threads:[~1999-01-10 18:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-10 17:13 Jelle Foks [this message]
1999-01-10 23:52 ` Ingo Oeser

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=Pine.LNX.4.03.9901101752050.13236-100000@zap.zap \
    --to=jelle@flying.demon.nl \
    --cc=linux-mm@kvack.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