All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* I/O and MM question
@ 1999-01-10 17:13 Jelle Foks
  1999-01-10 23:52 ` Ingo Oeser
  0 siblings, 1 reply; 2+ messages in thread
From: Jelle Foks @ 1999-01-10 17:13 UTC (permalink / raw
  To: linux-mm

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: I/O and MM question
  1999-01-10 17:13 I/O and MM question Jelle Foks
@ 1999-01-10 23:52 ` Ingo Oeser
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Oeser @ 1999-01-10 23:52 UTC (permalink / raw
  To: Jelle Foks; +Cc: linux-mm

On Sun, 10 Jan 1999, Jelle Foks wrote:

> (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?)? 

What about sendfile(2) ? It's linux-sepcific, but it does avoid
the getuser/putuser-couple for the data to be read/written.

cu
  Ingo
-- 
Feel the power of the penguin - run linux@your.pc
<esc>:x

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-01-10 23:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-10 17:13 I/O and MM question Jelle Foks
1999-01-10 23:52 ` Ingo Oeser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.