Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Why is mmap()ed reserved memory so slow?
@ 2005-07-15 22:21 David Chau
  2005-07-15 22:35 ` Dan Malek
  2005-07-18 10:51 ` Ralf Baechle
  0 siblings, 2 replies; 4+ messages in thread
From: David Chau @ 2005-07-15 22:21 UTC (permalink / raw)
  To: linux-mips

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

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

end of thread, other threads:[~2005-07-19 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-15 22:21 Why is mmap()ed reserved memory so slow? David Chau
2005-07-15 22:35 ` Dan Malek
2005-07-18 14:44   ` David Chau
2005-07-18 10:51 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox