mapping memory reserved by "memmap" kernel boot param into user space
Jayram Déshpandé <jaydesh9 <at> gmail.com>
2013-04-01 05:11:56 GMT
As discussed in this discussion, i am reserving a memory chunk at the
boot time using a kernel boot parameter memmap=8G$64G
I have written a character driver  kernel module which , during
initialization does a ioremap of this reserved memory chunk. As explained
here , in my driver mmap all i need to do is remap_pfn_range for this
memory chunk pointer returned by the ioremap.
I am running this on 3.x linux kernel. My user space application opens this
memory chunk as a device mounted by the driver. When i do mmap from the use
space application i see a system hang. my dmesg don't provide me much
So questions are :
1 ) Does remap_pfn_range function have some upper limit on the size of the
memory that can be remaped to ? Note that i am trying to reserve a
comparatively large chunks of memory at the boot time of the order of 64GB
to about 150GB. The system can have 128 to 256 GB of ram.
2) I tried by disabling the ioremap from the initialization and thus
directly doing the page frame numbers remapping in the mmap ioctl routing.
But that also results in a hang.
3) I tried with a page-fault handler , but that doesn't seem to help either.