I would like to suggest we add a vma->prepopulate() callback which is where the remap_pfn should go. Once the VMA is finalized and fully operational the vma_ops have the opportunity to prepopulate any PTEs.I assume you mean vma->vm_ops->prepopulate ? We also have to think about other places where we prepopulate also, for instance the perf mmap call now prepopulates (ahem that was me). So I do like this as a generalisation.
Sounds interesting to me. -- Cheers, David / dhildenb