Re: Why is mmap()ed reserved memory so slow?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jul 15, 2005, at 6:21 PM, David Chau wrote:

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?

How about a little more info, like what kernel are you using and what are
the parameters you are sending to mmap()?

One of the things that happens here is /dev/mem is thinking this memory is
not real memory (because you said the system has only 253M of real
memory), so it treats it like IO space. This causes changes to the attributes
of the pages, most notably the CCA type for cache or pipeline behavior,
which isn't what you want in this case.

The better way to approach this is to place an mmap() function in the
associated driver that works in conjunction with the application to gain
shared access as you expect.  This also closes a hole where an errant
application could write into unexpected places through /dev/mem.

Thanks.

	-- Dan



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux