Hi majordomo,
Sorry to bother you.
I noticed that there are two functions provided to map memory to user space from kernel: remap_pfn_range and vm_insert_page.
There is one difference that vm_insert_page increase task rss MM_FILEPAGES value. But remap_pfn_range doesn’t.
The issue is the munmap function will call zap_pte_range to decrease task rss MM_FILEPAGES value.
So, the task rss MM_FILEPAGES value increase and decrease doesn’t match.
And there are many places in kernel driver call remap_pfn_range to map memory to user space.
I think remap_pfn_range should also increase task rss MM_FILEPAGES value.
If there is any misunderstanding, please correct me.
Thanks.
BestRegards,
Ivan.liu