From: David Chau <dchau@mazunetworks.com>
To: linux-mips@linux-mips.org
Subject: Why is mmap()ed reserved memory so slow?
Date: Fri, 15 Jul 2005 18:21:44 -0400 [thread overview]
Message-ID: <42D836F8.8030209@mazunetworks.com> (raw)
Hi all,
I'm working on a driver for the Broadcom 1250, and I am using reserved
memory for some data buffers. The board comes with 256 MB of RAM, so I
boot Linux with "mem=253M" to reserve some RAM at the top of memory, and
then mmap() /dev/mem starting at 253 MB.
The problem is that accessing this memory is ridiculously slow. A simple
benchmark revealed that it takes about 200 cycles to read a 64-bit
number. If I mmap() /dev/zero instead, a read takes under 3 cycles.
For those of you who knows how the Linux VM works, could you tell me why
the memory access is so slow? It look like it might be invoking the
page-fault handler on every read. How can I make memory access faster?
Thanks,
David
next reply other threads:[~2005-07-15 22:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-15 22:21 David Chau [this message]
2005-07-15 22:35 ` Why is mmap()ed reserved memory so slow? Dan Malek
2005-07-18 14:44 ` David Chau
2005-07-18 10:51 ` Ralf Baechle
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=42D836F8.8030209@mazunetworks.com \
--to=dchau@mazunetworks.com \
--cc=linux-mips@linux-mips.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