linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Memory mapped IO and Direct File IO
@ 2009-08-04  6:06 Stefan Bohne
  0 siblings, 0 replies; only message in thread
From: Stefan Bohne @ 2009-08-04  6:06 UTC (permalink / raw)
  To: linuxppc-dev

Greetings, everyone,

I'm trying to save some data block from a memory mapped device into a
file - real fast, i.e., without any copying.

My approach so far was to get a pointer to the io memory via mmap-ing
/dev/mem, and then writing this pointer to a file (in user space).
This works, if I don't use O_DIRECT, but this is slow of course. Using
O_DIRECT, write returns EFAULT (bad address). Coyping the data to a
user-space buffer and then writing with O_DIRECT works, though.

I tracked this down to __get_user_pages in mm/memory.c where IO pages
are refused. And this is as deep as my current knowledge allows me to
go into the kernel. I don't understand why IO pointers are not
allowed.

Ultra-Fast disk IO is a requirement for our project, so any copying in
between is not an option. Any hint is appreciated.

Stefan

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-04  6:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04  6:06 Memory mapped IO and Direct File IO Stefan Bohne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).