From: Stefan Bohne <Stefan.Bohne@senTec-Elektronik.de>
To: linuxppc-dev@lists.ozlabs.org
Subject: Memory mapped IO and Direct File IO
Date: Tue, 4 Aug 2009 08:06:03 +0200 [thread overview]
Message-ID: <c42b3320908032306y51770c97lb8e5769dd3ecbdb9@mail.gmail.com> (raw)
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
reply other threads:[~2009-08-04 6:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=c42b3320908032306y51770c97lb8e5769dd3ecbdb9@mail.gmail.com \
--to=stefan.bohne@sentec-elektronik.de \
--cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).