|Subject:||Why is mmap()ed reserved memory so slow?|
|From:||David Chau <firstname.lastname@example.org>|
|Date:||Fri, 15 Jul 2005 18:21:44 -0400|
|User-agent:||Mozilla Thunderbird 1.0.2-1.3.3 (X11/20050513)|
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?
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: New VINO video drivers for Indy, Mikael Nousiainen|
|Next by Date:||Re: Why is mmap()ed reserved memory so slow?, Dan Malek|
|Previous by Thread:||[PATCH 2.6] vr41xx: remove obsolete GIU driver, Yoichi Yuasa|
|Next by Thread:||Re: Why is mmap()ed reserved memory so slow?, Dan Malek|
|Indexes:||[Date] [Thread] [Top] [All Lists]|