Hello everyone I am trying mmap kernel buffers associated with a device file (like /dev/mem) using huge pages. I couldn’t find any mechanism to do this. On the kernel side I allocate a contiguous 2M buffer using alloc_pages. A regular mmap with MAP_HUGETLB flag will only accept anonymous mappings or hugetlbfs files but not device files. So, I think I need to make sure the mapping uses huge pages in my device file’s mmap hook. Usually these kind of mmap fops use remap_pfn_range but I couldn’t find a way to make remap_pfn_range use huge pages. I also tried to make Transparent huge pages recognize the mapping done with remap_pfn_range and collapse them to a huge page but that didn’t work. Not sure why
I would appreciate any advice on this issue Thanks ! ------------------- Yehuda Yitschak Marvell Semiconductor Ltd. |